Skip to content

Commit 4433116

Browse files
committed
Rollup merge of #54713 - flip1995:tool_lints_nightly, r=Manishearth
Add nightly check for tool_lints warning cc #54358 Let's add the nightly check, just in case something prevents a stabilization until 1.31.beta.
2 parents 94254d3 + e68db04 commit 4433116

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/librustc/lint/levels.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use lint::context::CheckLintNameResult;
1818
use lint::{self, Lint, LintId, Level, LintSource};
1919
use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey,
2020
StableHasher, StableHasherResult};
21-
use session::Session;
21+
use session::{config::nightly_options, Session};
2222
use syntax::ast;
2323
use syntax::attr;
2424
use syntax::source_map::MultiSpan;
@@ -299,7 +299,13 @@ impl<'a> LintLevelsBuilder<'a> {
299299
"change it to",
300300
new_lint_name.to_string(),
301301
Applicability::MachineApplicable,
302-
).emit();
302+
);
303+
304+
if nightly_options::is_nightly_build() {
305+
err.emit();
306+
} else {
307+
err.cancel();
308+
}
303309

304310
let src = LintSource::Node(Symbol::intern(&new_lint_name), li.span);
305311
for id in ids {

0 commit comments

Comments
 (0)