From aabca44d27fbede156d2f87ee75f24fc3176d052 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 29 Apr 2020 15:08:03 +0200 Subject: [PATCH] Enforce even more the code blocks attributes check through rustdoc --- src/bootstrap/builder.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index f6060ac14e75..6157d3d4ac69 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -725,7 +725,9 @@ impl<'a> Builder<'a> { .env("CFG_RELEASE_CHANNEL", &self.config.channel) .env("RUSTDOC_REAL", self.rustdoc(compiler)) .env("RUSTDOC_CRATE_VERSION", self.rust_version()) - .env("RUSTC_BOOTSTRAP", "1"); + .env("RUSTC_BOOTSTRAP", "1") + .arg("--deny") + .arg("invalid_codeblock_attribute"); // Remove make-related flags that can cause jobserver problems. cmd.env_remove("MAKEFLAGS"); @@ -838,7 +840,8 @@ impl<'a> Builder<'a> { // FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`, // but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See // #71458. - let rustdocflags = rustflags.clone(); + let mut rustdocflags = rustflags.clone(); + rustdocflags.arg("--deny").arg("invalid_codeblock_attribute"); if let Ok(s) = env::var("CARGOFLAGS") { cargo.args(s.split_whitespace());