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

@ -87,7 +87,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
let is_feature_allowed = |feature_gate| {
// All features require that the corresponding gate be enabled,
// even if the function has `#[rustc_allow_const_fn_unstable(the_gate)]`.
if !tcx.features().active(feature_gate) {
if !tcx.features().enabled(feature_gate) {
return false;
}
@ -135,7 +135,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
let required_gates = required_gates.unwrap_or(&[]);
let missing_gates: Vec<_> =
required_gates.iter().copied().filter(|&g| !features.active(g)).collect();
required_gates.iter().copied().filter(|&g| !features.enabled(g)).collect();
match missing_gates.as_slice() {
[] => {