@@ -50,7 +50,7 @@ use rustc_data_structures::sorted_map::SortedMap;
5050use  rustc_data_structures:: stable_hasher:: { HashStable ,  StableHasher } ; 
5151use  rustc_data_structures:: sync:: spawn; 
5252use  rustc_data_structures:: tagged_ptr:: TaggedRef ; 
53- use  rustc_errors:: { DiagArgFromDisplay ,  DiagCtxtHandle ,   StashKey } ; 
53+ use  rustc_errors:: { DiagArgFromDisplay ,  DiagCtxtHandle } ; 
5454use  rustc_hir:: def:: { DefKind ,  LifetimeRes ,  Namespace ,  PartialRes ,  PerNS ,  Res } ; 
5555use  rustc_hir:: def_id:: { CRATE_DEF_ID ,  LOCAL_CRATE ,  LocalDefId } ; 
5656use  rustc_hir:: { 
@@ -61,7 +61,7 @@ use rustc_index::{Idx, IndexSlice, IndexVec};
6161use  rustc_macros:: extension; 
6262use  rustc_middle:: span_bug; 
6363use  rustc_middle:: ty:: { ResolverAstLowering ,  TyCtxt } ; 
64- use  rustc_session:: parse:: { add_feature_diagnostics,  feature_err } ; 
64+ use  rustc_session:: parse:: add_feature_diagnostics; 
6565use  rustc_span:: symbol:: { Ident ,  Symbol ,  kw,  sym} ; 
6666use  rustc_span:: { DUMMY_SP ,  DesugaringKind ,  Span } ; 
6767use  smallvec:: { SmallVec ,  smallvec} ; 
@@ -2068,15 +2068,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
20682068        // `ExprKind::Paren(ExprKind::Underscore)` and should also be lowered to `GenericArg::Infer` 
20692069        match  c. value . peel_parens ( ) . kind  { 
20702070            ExprKind :: Underscore  => { 
2071-                 if  !self . tcx . features ( ) . generic_arg_infer ( )  { 
2072-                     feature_err ( 
2073-                         & self . tcx . sess , 
2074-                         sym:: generic_arg_infer, 
2075-                         c. value . span , 
2076-                         fluent_generated:: ast_lowering_underscore_array_length_unstable, 
2077-                     ) 
2078-                     . stash ( c. value . span ,  StashKey :: UnderscoreForArrayLengths ) ; 
2079-                 } 
20802071                let  ct_kind = hir:: ConstArgKind :: Infer ( self . lower_span ( c. value . span ) ,  ( ) ) ; 
20812072                self . arena . alloc ( hir:: ConstArg  {  hir_id :  self . lower_node_id ( c. id ) ,  kind :  ct_kind } ) 
20822073            } 
0 commit comments