1
Fork 0

Suggest minimal subset features in incomplete_features lint

This commit is contained in:
Yuki Okushi 2020-10-14 08:35:32 +09:00
parent a78a62fc99
commit f7150be674
88 changed files with 95 additions and 0 deletions

View file

@ -2288,12 +2288,20 @@ impl EarlyLintPass for IncompleteFeatures {
n, n,
));
}
if HAS_MIN_FEATURES.contains(&name) {
builder.help(&format!(
"consider using `min_{}` instead, which is more stable and complete",
name,
));
}
builder.emit();
})
});
}
}
const HAS_MIN_FEATURES: &[Symbol] = &[sym::const_generics, sym::specialization];
declare_lint! {
/// The `invalid_value` lint detects creating a value that is not valid,
/// such as a NULL reference.