From 0797ffec09c79d99943cb95b5b455c0d2278ea2f Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Thu, 21 Jan 2021 22:51:58 -0500 Subject: [PATCH] Deny internal lints for rustdoc --- src/bootstrap/check.rs | 7 +++++++ src/librustdoc/lib.rs | 1 + 2 files changed, 8 insertions(+) diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index c19bb536ce83..6626fead774d 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -320,6 +320,13 @@ macro_rules! tool_check_step { cargo.arg("--all-targets"); } + // Enable internal lints for clippy and rustdoc + // 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"); + } + builder.info(&format!( "Checking stage{} {} artifacts ({} -> {})", builder.top_stage, diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 2dddcd1c3464..d17189b416dd 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -18,6 +18,7 @@ #![feature(str_split_once)] #![feature(iter_intersperse)] #![recursion_limit = "256"] +#![deny(rustc::internal)] #[macro_use] extern crate lazy_static;