Skip to content

Commit d70e6e1

Browse files
Apply review comments
1 parent aabca44 commit d70e6e1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bootstrap/builder.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,10 @@ impl<'a> Builder<'a> {
726726
.env("RUSTDOC_REAL", self.rustdoc(compiler))
727727
.env("RUSTDOC_CRATE_VERSION", self.rust_version())
728728
.env("RUSTC_BOOTSTRAP", "1")
729-
.arg("--deny")
730-
.arg("invalid_codeblock_attribute");
729+
.arg("-Dinvalid_codeblock_attribute");
730+
if self.config.deny_warnings {
731+
cmd.arg("-Dwarnings");
732+
}
731733

732734
// Remove make-related flags that can cause jobserver problems.
733735
cmd.env_remove("MAKEFLAGS");
@@ -841,7 +843,6 @@ impl<'a> Builder<'a> {
841843
// but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See
842844
// #71458.
843845
let mut rustdocflags = rustflags.clone();
844-
rustdocflags.arg("--deny").arg("invalid_codeblock_attribute");
845846

846847
if let Ok(s) = env::var("CARGOFLAGS") {
847848
cargo.args(s.split_whitespace());
@@ -1160,6 +1161,8 @@ impl<'a> Builder<'a> {
11601161
// are always ignored in dependencies. Eventually this should be
11611162
// fixed via better support from Cargo.
11621163
cargo.env("RUSTC_LINT_FLAGS", lint_flags.join(" "));
1164+
1165+
rustdocflags.arg("-Dinvalid_codeblock_attribute");
11631166
}
11641167

11651168
if let Mode::Rustc | Mode::Codegen = mode {

0 commit comments

Comments
 (0)