1
Fork 0

terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it)

This commit is contained in:
Ralf Jung 2024-10-08 14:06:56 +02:00
parent 3ec4308f6c
commit 46ce5cbf33
21 changed files with 117 additions and 131 deletions

View file

@ -1007,10 +1007,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
{
let feature = stability.feature;
let is_allowed = |feature| {
self.tcx.features().declared_features.contains(&feature)
|| span.allows_unstable(feature)
};
let is_allowed =
|feature| self.tcx.features().enabled(feature) || span.allows_unstable(feature);
let allowed_by_implication = implied_by.is_some_and(|feature| is_allowed(feature));
if !is_allowed(feature) && !allowed_by_implication {
let lint_buffer = &mut self.lint_buffer;