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
1 changed files with 4 additions and 0 deletions
|
@ -124,6 +124,8 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute]) -> Features {
|
||||||
edition,
|
edition,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
features.declared_lang_features.push((name, mi.span(), None));
|
||||||
|
features.declared_features.insert(name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +139,8 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute]) -> Features {
|
||||||
feature: name,
|
feature: name,
|
||||||
edition: features_edition,
|
edition: features_edition,
|
||||||
});
|
});
|
||||||
|
features.declared_lang_features.push((name, mi.span(), None));
|
||||||
|
features.declared_features.insert(name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue