Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #829 from GuillaumeGomez/generate-link-to-def
Browse files Browse the repository at this point in the history
Add `--generate-link-to-definition` option when building on docs.rs
  • Loading branch information
sdroege committed Jul 17, 2023
2 parents 17ec013 + c370d45 commit 3db7b37
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,11 @@ jobs:
# not nightly
# clippy
- run: rustup component add clippy
if: matrix.rust == 'beta' || matrix.rust == 'stable'
if: matrix.rust == 'stable'
- working-directory: ${{ matrix.conf.name }}
name: clippy ${{ matrix.conf.name }}
run: cargo clippy --all-targets -- -D warnings
if: matrix.rust == 'stable'
- working-directory: ${{ matrix.conf.name }}
name: clippy ${{ matrix.conf.name }}
run: cargo clippy --all-targets
if: matrix.rust == 'beta'
# tests
- name: tests (rust ${{ matrix.rust }})
run: xvfb-run --auto-servernum cargo test --manifest-path ${{ matrix.conf.name }}/Cargo.toml --features "${{ matrix.conf.features }}"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- run: python3 ./generator.py --embed-docs --yes ./
- run: git clone https://gitlab.gnome.org/World/Rust/gir-rustdoc/ # checkout action doesn't support random urls
- run: echo "RUSTDOCFLAGS=$(eval python3 ./gir-rustdoc/gir-rustdoc.py --pages-url 'https://gtk-rs.org/gtk3-rs/' --default-branch 'master' pre-docs | xargs)" >> ${GITHUB_ENV}
env:
RUSTDOCFLAGS: >
-Zunstable-options --generate-link-to-definition
- uses: actions-rs/cargo@v1
with:
command: doc
Expand Down
2 changes: 1 addition & 1 deletion atk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ v2_34 = ["v2_32", "ffi/v2_34"]
v2_38 = ["v2_34", "ffi/v2_38"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[dependencies]
libc = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion gdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ v3_24 = ["ffi/v3_24"]
unsafe-assume-initialized = []

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[dependencies]
libc = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion gdkwayland/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ v3_24 = ["ffi/v3_24", "gdk/v3_24"]
v3_24_22 = ["v3_24", "ffi/v3_24_22"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[dependencies]
ffi = { path = "./sys", package = "gdkwayland-sys" }
Expand Down
2 changes: 1 addition & 1 deletion gdkx11/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name = "gdkx11"
v3_24 = ["ffi/v3_24_2"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[dependencies]
libc = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion gtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ gio_v2_58 = ["gio/v2_58"]
unsafe-assume-initialized = []

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[build-dependencies]
pkg-config = "0.3.7"
Expand Down

0 comments on commit 3db7b37

Please sign in to comment.