diff --git a/.cargo/config.toml b/.cargo/config.toml index 5b0f95da1..6be194a0c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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", +] diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ac3be34d7..a8ec87324 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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