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
|
@ -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() {
|
||||
[] => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue