mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Record all declared features.
Currently `rust_20XX_preview` features aren't recorded as declared even when they are explicit declared. Similarly, redundant edition-dependent features (e.g. `test_2018_feature`) aren't recorded as declared. This commit marks them as recorded. There is no detectable functional change, but it makes things more consistent.
This commit is contained in:
parent
eb209057b1
commit
95d1aa075f
@ -124,6 +124,8 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute]) -> Features {
|
||||
edition,
|
||||
});
|
||||
}
|
||||
features.declared_lang_features.push((name, mi.span(), None));
|
||||
features.declared_features.insert(name);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -137,6 +139,8 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute]) -> Features {
|
||||
feature: name,
|
||||
edition: features_edition,
|
||||
});
|
||||
features.declared_lang_features.push((name, mi.span(), None));
|
||||
features.declared_features.insert(name);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user