Skip to content

Commit

Permalink
Rollup merge of rust-lang#84484 - jyn514:check-tools, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Don't rebuild rustdoc and clippy after checking bootstrap

This works by unconditionally passing -Z unstable-options to the
compiler. This has no affect in practice since bootstrap doesn't use
`deny(rustc::internal)`.

Fixes rust-lang#82461.

r? `@Mark-Simulacrum`
  • Loading branch information
m-ou-se committed Apr 28, 2021
2 parents da43ee8 + 1c8e122 commit 6d6bbfc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,9 @@ macro_rules! tool_check_step {
}

// Enable internal lints for clippy and rustdoc
// NOTE: this intentionally doesn't enable lints for any other tools,
// see https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776
if $path == "src/tools/rustdoc" || $path == "src/tools/clippy" {
cargo.rustflag("-Zunstable-options");
}
// NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]`
// See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776
cargo.rustflag("-Zunstable-options");

builder.info(&format!(
"Checking stage{} {} artifacts ({} -> {})",
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#![feature(type_ascription)]
#![feature(iter_intersperse)]
#![recursion_limit = "256"]
#![deny(rustc::internal)]
#![warn(rustc::internal)]

#[macro_use]
extern crate lazy_static;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// warn on lints, that are included in `rust-lang/rust`s bootstrap
#![warn(rust_2018_idioms, unused_lifetimes)]
// warn on rustc internal lints
#![deny(rustc::internal)]
#![warn(rustc::internal)]

// FIXME: switch to something more ergonomic here, once available.
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// warn on lints, that are included in `rust-lang/rust`s bootstrap
#![warn(rust_2018_idioms, unused_lifetimes)]
// warn on rustc internal lints
#![deny(rustc::internal)]
#![warn(rustc::internal)]

// FIXME: switch to something more ergonomic here, once available.
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
Expand Down

0 comments on commit 6d6bbfc

Please sign in to comment.