diff options
| author | Ralf Jung <post@ralfj.de> | 2024-10-08 14:06:56 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-10-22 07:37:54 +0100 |
| commit | 46ce5cbf339e1ea84d2b28ac04369084b9f2d948 (patch) | |
| tree | 2feba5fd8bcd636d45364e65ebe0a32e6ba0f4fd /compiler/rustc_passes/src/check_const.rs | |
| parent | 3ec4308f6cb4bba3140d736d9ebd53b234fa7df8 (diff) | |
| download | rust-46ce5cbf339e1ea84d2b28ac04369084b9f2d948.tar.gz rust-46ce5cbf339e1ea84d2b28ac04369084b9f2d948.zip | |
terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it)
Diffstat (limited to 'compiler/rustc_passes/src/check_const.rs')
| -rw-r--r-- | compiler/rustc_passes/src/check_const.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs index 0dad94a9939..ca13ca11673 100644 --- a/compiler/rustc_passes/src/check_const.rs +++ b/compiler/rustc_passes/src/check_const.rs @@ -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() { [] => { |
