Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't rebuild rustdoc and clippy after checking bootstrap #84484

Merged
merged 2 commits into from
Apr 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, this comment seems odd or at least in need of updates - mind removing it I guess?

Are we gating internal lints on a CLI flag being passed? I guess we're enabling them on the CLI so that makes some sense, but then I'm not sure why this piece of code is in check.rs vs. Builder::cargo or so, alongside actually enabling the lints.

Generally deny(rustc::internal) isn't quite what we want in-code too, as we want deny-warnings=false to work locally...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we gating internal lints on a CLI flag being passed?

Yes, the compiler doesn't run internal lints unless -Z unstable-options is passed, even if you have #[warn(rustc::internal)].

Generally deny(rustc::internal) isn't quite what we want in-code too, as we want deny-warnings=false to work locally...

Oh good point - I'll fix it in rustdoc and update the comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good point - I'll fix it in rustdoc and update the comment.

Done.

// 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 `#![deny(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