Rollup merge of - flip1995:tool_lints_nightly, r=Manishearth

Add nightly check for tool_lints warning

cc 

Let's add the nightly check, just in case something prevents a stabilization until 1.31.beta.
This commit is contained in:
kennytm 2018-10-01 17:49:09 +08:00
commit 4433116da1
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C

@ -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;
@ -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 {