@@ -15,13 +15,13 @@ use crate::errors;
1515/// The common case. 
1616macro_rules!  gate { 
1717    ( $visitor: expr,  $feature: ident,  $span: expr,  $explain: expr)  => { { 
18-         if  !$visitor. features. $feature && !$span. allows_unstable( sym:: $feature)  { 
18+         if  !$visitor. features. $feature( )  && !$span. allows_unstable( sym:: $feature)  { 
1919            #[ allow( rustc:: untranslatable_diagnostic) ]  // FIXME: make this translatable 
2020            feature_err( & $visitor. sess,  sym:: $feature,  $span,  $explain) . emit( ) ; 
2121        } 
2222    } } ; 
2323    ( $visitor: expr,  $feature: ident,  $span: expr,  $explain: expr,  $help: expr)  => { { 
24-         if  !$visitor. features. $feature && !$span. allows_unstable( sym:: $feature)  { 
24+         if  !$visitor. features. $feature( )  && !$span. allows_unstable( sym:: $feature)  { 
2525            // FIXME: make this translatable 
2626            #[ allow( rustc:: diagnostic_outside_of_impl) ] 
2727            #[ allow( rustc:: untranslatable_diagnostic) ] 
@@ -43,7 +43,7 @@ macro_rules! gate_alt {
4343/// The case involving a multispan. 
4444macro_rules!  gate_multi { 
4545    ( $visitor: expr,  $feature: ident,  $spans: expr,  $explain: expr)  => { { 
46-         if  !$visitor. features. $feature { 
46+         if  !$visitor. features. $feature( )  { 
4747            let  spans:  Vec <_> =
4848                $spans. filter( |span| !span. allows_unstable( sym:: $feature) ) . collect( ) ; 
4949            if  !spans. is_empty( )  { 
@@ -56,7 +56,7 @@ macro_rules! gate_multi {
5656/// The legacy case. 
5757macro_rules!  gate_legacy { 
5858    ( $visitor: expr,  $feature: ident,  $span: expr,  $explain: expr)  => { { 
59-         if  !$visitor. features. $feature && !$span. allows_unstable( sym:: $feature)  { 
59+         if  !$visitor. features. $feature( )  && !$span. allows_unstable( sym:: $feature)  { 
6060            feature_warn( & $visitor. sess,  sym:: $feature,  $span,  $explain) ; 
6161        } 
6262    } } ; 
@@ -150,7 +150,7 @@ impl<'a> PostExpansionVisitor<'a> {
150150
151151        // FIXME(non_lifetime_binders): Const bound params are pretty broken. 
152152        // Let's keep users from using this feature accidentally. 
153-         if  self . features . non_lifetime_binders  { 
153+         if  self . features . non_lifetime_binders ( )  { 
154154            let  const_param_spans:  Vec < _ >  = params
155155                . iter ( ) 
156156                . filter_map ( |param| match  param. kind  { 
@@ -210,7 +210,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
210210        } 
211211
212212        // Emit errors for non-staged-api crates. 
213-         if  !self . features . staged_api  { 
213+         if  !self . features . staged_api ( )  { 
214214            if  attr. has_name ( sym:: unstable) 
215215                || attr. has_name ( sym:: stable) 
216216                || attr. has_name ( sym:: rustc_const_unstable) 
@@ -470,7 +470,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
470470            // Limit `min_specialization` to only specializing functions. 
471471            gate_alt ! ( 
472472                & self , 
473-                 self . features. specialization || ( is_fn && self . features. min_specialization) , 
473+                 self . features. specialization( )  || ( is_fn && self . features. min_specialization( ) ) , 
474474                sym:: specialization, 
475475                i. span, 
476476                "specialization is unstable" 
@@ -548,7 +548,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
548548    gate_all ! ( global_registration,  "global registration is experimental" ) ; 
549549    gate_all ! ( return_type_notation,  "return type notation is experimental" ) ; 
550550
551-     if  !visitor. features . never_patterns  { 
551+     if  !visitor. features . never_patterns ( )  { 
552552        if  let  Some ( spans)  = spans. get ( & sym:: never_patterns)  { 
553553            for  & span in  spans { 
554554                if  span. allows_unstable ( sym:: never_patterns)  { 
@@ -572,7 +572,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
572572        } 
573573    } 
574574
575-     if  !visitor. features . negative_bounds  { 
575+     if  !visitor. features . negative_bounds ( )  { 
576576        for  & span in  spans. get ( & sym:: negative_bounds) . iter ( ) . copied ( ) . flatten ( )  { 
577577            sess. dcx ( ) . emit_err ( errors:: NegativeBoundUnsupported  {  span } ) ; 
578578        } 
0 commit comments