Skip to content

Commit

Permalink
Rollup merge of rust-lang#54713 - flip1995:tool_lints_nightly, r=Mani…
Browse files Browse the repository at this point in the history
…shearth

Add nightly check for tool_lints warning

cc rust-lang#54358

Let's add the nightly check, just in case something prevents a stabilization until 1.31.beta.
  • Loading branch information
kennytm committed Oct 1, 2018
2 parents 94254d3 + e68db04 commit 4433116
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/librustc/lint/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use lint::context::CheckLintNameResult;
use lint::{self, Lint, LintId, Level, LintSource};
use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey,
StableHasher, StableHasherResult};
use session::Session;
use session::{config::nightly_options, Session};
use syntax::ast;
use syntax::attr;
use syntax::source_map::MultiSpan;
Expand Down Expand Up @@ -299,7 +299,13 @@ impl<'a> LintLevelsBuilder<'a> {
"change it to",
new_lint_name.to_string(),
Applicability::MachineApplicable,
).emit();
);

if nightly_options::is_nightly_build() {
err.emit();
} else {
err.cancel();
}

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

0 comments on commit 4433116

Please sign in to comment.