diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-12-29 23:16:16 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-03-01 19:29:15 -0500 |
| commit | cc62018e61edfa9706b8e4e61d1b571bdee7827d (patch) | |
| tree | 1ebbd81e12417c7e57f99d3bf7dbb96247bbab1c /src/bootstrap | |
| parent | 4f20caa6258d4c74ce6b316fd347e3efe81cf557 (diff) | |
| download | rust-cc62018e61edfa9706b8e4e61d1b571bdee7827d.tar.gz rust-cc62018e61edfa9706b8e4e61d1b571bdee7827d.zip | |
Rename rustdoc lints to be a tool lint instead of built-in.
- Rename `broken_intra_doc_links` to `rustdoc::broken_intra_doc_links` - Ensure that the old lint names still work and give deprecation errors - Register lints even when running doctests Otherwise, all `rustdoc::` lints would be ignored. - Register all existing lints as removed This unfortunately doesn't work with `register_renamed` because tool lints have not yet been registered when rustc is running. For similar reasons, `check_backwards_compat` doesn't work either. Call `register_removed` directly instead. - Fix fallout + Rustdoc lints for compiler/ + Rustdoc lints for library/ Note that this does *not* suggest `rustdoc::broken_intra_doc_links` for `rustdoc::intra_doc_link_resolution_failure`, since there was no time when the latter was valid.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 2008348ea8d..9317c89625d 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -735,8 +735,15 @@ impl<'a> Builder<'a> { .env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler)) .env("CFG_RELEASE_CHANNEL", &self.config.channel) .env("RUSTDOC_REAL", self.rustdoc(compiler)) - .env("RUSTC_BOOTSTRAP", "1") - .arg("-Winvalid_codeblock_attributes"); + .env("RUSTC_BOOTSTRAP", "1"); + + // cfg(bootstrap), can be removed on the next beta bump + if compiler.stage == 0 { + cmd.arg("-Winvalid_codeblock_attributes"); + } else { + cmd.arg("-Wrustdoc::invalid_codeblock_attributes"); + } + if self.config.deny_warnings { cmd.arg("-Dwarnings"); } @@ -1292,7 +1299,12 @@ impl<'a> Builder<'a> { // fixed via better support from Cargo. cargo.env("RUSTC_LINT_FLAGS", lint_flags.join(" ")); - rustdocflags.arg("-Winvalid_codeblock_attributes"); + // cfg(bootstrap), can be removed on the next beta bump + if compiler.stage == 0 { + rustdocflags.arg("-Winvalid_codeblock_attributes"); + } else { + rustdocflags.arg("-Wrustdoc::invalid_codeblock_attributes"); + } } if mode == Mode::Rustc { |
