Fix doc links pointing to private items (#6944)
Our documentation for some public items contains links to private items. These links resolve fine because we use the `--document-private-flags`, but still generate warnings during the compilation of the docs. This commit (hopefully) correctly suppresses the warnings, and updates CI.
This commit is contained in:
parent
4d1ff3b363
commit
c4c29eb466
|
@ -55,12 +55,6 @@ rustflags = [
|
|||
# Documentation
|
||||
"-Wmissing_docs",
|
||||
|
||||
# These rustdoc -A and -W settings must be the same as the RUSTDOCFLAGS in:
|
||||
# https://github.com/ZcashFoundation/zebra/blob/main/.github/workflows/lint.yml#L152
|
||||
|
||||
# Links in public docs can point to private items.
|
||||
"-Arustdoc::private_intra_doc_links",
|
||||
|
||||
# TODOs:
|
||||
# `cargo fix` might help do these fixes,
|
||||
# or add a config.toml to sub-directories which should allow these lints,
|
||||
|
@ -82,3 +76,12 @@ rustflags = [
|
|||
# fix hidden lifetime parameters
|
||||
#"-Wrust_2018_idioms",
|
||||
]
|
||||
|
||||
[build]
|
||||
rustdocflags = [
|
||||
# The -A and -W settings must be the same as the `RUSTDOCFLAGS` in:
|
||||
# https://github.com/ZcashFoundation/zebra/blob/main/.github/workflows/lint.yml#L151
|
||||
|
||||
# Links in public docs can point to private items.
|
||||
"-Arustdoc::private_intra_doc_links",
|
||||
]
|
||||
|
|
|
@ -145,8 +145,8 @@ jobs:
|
|||
# cargo doc doesn't support '-- -D warnings', so we have to add it here
|
||||
# https://github.com/rust-lang/cargo/issues/8424#issuecomment-774662296
|
||||
#
|
||||
# These -A and -W settings must be the same as the rustdoc settings in:
|
||||
# https://github.com/ZcashFoundation/zebra/blob/main/.cargo/config.toml#L53
|
||||
# The -A and -W settings must be the same as the `rustdocflags` in:
|
||||
# https://github.com/ZcashFoundation/zebra/blob/main/.cargo/config.toml#L87
|
||||
env:
|
||||
RUSTDOCFLAGS: -D warnings -A rustdoc::private_intra_doc_links
|
||||
|
||||
|
|
Loading…
Reference in New Issue