]> git.lizzy.rs Git - rust.git/commitdiff
Enforce even more the code blocks attributes check through rustdoc
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 29 Apr 2020 13:08:03 +0000 (15:08 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 16 Jul 2020 14:39:05 +0000 (16:39 +0200)
src/bootstrap/builder.rs

index f6060ac14e75ebafb23b42c3e0114929846e52fb..6157d3d4ac695a32935db46086288ce44b0f12d7 100644 (file)
@@ -725,7 +725,9 @@ pub fn rustdoc_cmd(&self, compiler: Compiler) -> Command {
             .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 @@ pub fn cargo(
         // 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());