diff options
| author | kennytm <kennytm@gmail.com> | 2018-10-01 17:49:09 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-10-01 17:49:09 +0800 |
| commit | 4433116da136e2e5ef388402b8e9d21f9787034c (patch) | |
| tree | 5018a12a678754aa8ccefda454a67369a4e9775c | |
| parent | 94254d38835c786b333c1ffbaeacebed36b4466c (diff) | |
| parent | e68db042888f6b3cb6164a5cc5bfc3a79faa851c (diff) | |
| download | rust-4433116da136e2e5ef388402b8e9d21f9787034c.tar.gz rust-4433116da136e2e5ef388402b8e9d21f9787034c.zip | |
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.
| -rw-r--r-- | src/librustc/lint/levels.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/librustc/lint/levels.rs b/src/librustc/lint/levels.rs index 80365a56102..87d33e473e7 100644 --- a/src/librustc/lint/levels.rs +++ b/src/librustc/lint/levels.rs @@ -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 { |
