Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove feature-gate code
  • Loading branch information
flip1995 authored and Manishearth committed Oct 9, 2018
commit ac231d40a33f9b4ef0fb50b22a0a4686dc42ecfc
17 changes: 1 addition & 16 deletions src/librustc/lint/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use session::{config::nightly_options, Session};
use syntax::ast;
use syntax::attr;
use syntax::source_map::MultiSpan;
use syntax::feature_gate;
use syntax::symbol::Symbol;
use util::nodemap::FxHashMap;

Expand Down Expand Up @@ -228,28 +227,14 @@ impl<'a> LintLevelsBuilder<'a> {
}
};
let tool_name = if let Some(lint_tool) = word.is_scoped() {
let gate_feature = !self.sess.features_untracked().tool_lints;
let known_tool = attr::is_known_lint_tool(lint_tool);
if gate_feature {
feature_gate::emit_feature_err(
&sess.parse_sess,
"tool_lints",
word.span,
feature_gate::GateIssue::Language,
&format!("scoped lint `{}` is experimental", word.ident),
);
}
if !known_tool {
if !attr::is_known_lint_tool(lint_tool) {
span_err!(
sess,
lint_tool.span,
E0710,
"an unknown tool name found in scoped lint: `{}`",
word.ident
);
}

if gate_feature || !known_tool {
continue;
}

Expand Down