terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it)
This commit is contained in:
parent
3ec4308f6c
commit
46ce5cbf33
21 changed files with 117 additions and 131 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue