Make incomplete features part of delcaration
This prevents mistakes where the feature is in the list of incomplete features but not actually a feature by making the incompleteness a part of the declaration.
This commit is contained in:
parent
1abb5bc992
commit
11ebd80fe7
6 changed files with 40 additions and 56 deletions
|
@ -2327,7 +2327,7 @@ impl EarlyLintPass for IncompleteFeatures {
|
|||
.iter()
|
||||
.map(|(name, span, _)| (name, span))
|
||||
.chain(features.declared_lib_features.iter().map(|(name, span)| (name, span)))
|
||||
.filter(|(name, _)| rustc_feature::INCOMPLETE_FEATURES.iter().any(|f| name == &f))
|
||||
.filter(|(&name, _)| features.incomplete(name))
|
||||
.for_each(|(&name, &span)| {
|
||||
cx.struct_span_lint(INCOMPLETE_FEATURES, span, |lint| {
|
||||
let mut builder = lint.build(&format!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue