diff options
| author | Smitty <me@smitop.com> | 2021-06-28 14:39:20 -0400 |
|---|---|---|
| committer | Smitty <me@smitop.com> | 2021-06-28 14:39:20 -0400 |
| commit | 11ebd80fe75ec02dbdd8058b8952d25eccb0c3dc (patch) | |
| tree | 90c1545aedcc496d58758a57c49076d78f775414 /compiler/rustc_lint/src | |
| parent | 1abb5bc992f0ab95ec507aa4b4feed12ec5a4450 (diff) | |
| download | rust-11ebd80fe75ec02dbdd8058b8952d25eccb0c3dc.tar.gz rust-11ebd80fe75ec02dbdd8058b8952d25eccb0c3dc.zip | |
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.
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 5479af1dc30..d7d0c978ca4 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -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!( |
