Skip to content

Commit aabca44

Browse files
Enforce even more the code blocks attributes check through rustdoc
1 parent 125c58c commit aabca44

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bootstrap/builder.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,9 @@ impl<'a> Builder<'a> {
725725
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
726726
.env("RUSTDOC_REAL", self.rustdoc(compiler))
727727
.env("RUSTDOC_CRATE_VERSION", self.rust_version())
728-
.env("RUSTC_BOOTSTRAP", "1");
728+
.env("RUSTC_BOOTSTRAP", "1")
729+
.arg("--deny")
730+
.arg("invalid_codeblock_attribute");
729731

730732
// Remove make-related flags that can cause jobserver problems.
731733
cmd.env_remove("MAKEFLAGS");
@@ -838,7 +840,8 @@ impl<'a> Builder<'a> {
838840
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,
839841
// but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See
840842
// #71458.
841-
let rustdocflags = rustflags.clone();
843+
let mut rustdocflags = rustflags.clone();
844+
rustdocflags.arg("--deny").arg("invalid_codeblock_attribute");
842845

843846
if let Ok(s) = env::var("CARGOFLAGS") {
844847
cargo.args(s.split_whitespace());

0 commit comments

Comments
 (0)