@@ -50,7 +50,7 @@ use rustc_data_structures::sorted_map::SortedMap;
50
50
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
51
51
use rustc_data_structures:: sync:: spawn;
52
52
use rustc_data_structures:: tagged_ptr:: TaggedRef ;
53
- use rustc_errors:: { DiagArgFromDisplay , DiagCtxtHandle , StashKey } ;
53
+ use rustc_errors:: { DiagArgFromDisplay , DiagCtxtHandle } ;
54
54
use rustc_hir:: def:: { DefKind , LifetimeRes , Namespace , PartialRes , PerNS , Res } ;
55
55
use rustc_hir:: def_id:: { CRATE_DEF_ID , LOCAL_CRATE , LocalDefId } ;
56
56
use rustc_hir:: {
@@ -61,7 +61,7 @@ use rustc_index::{Idx, IndexSlice, IndexVec};
61
61
use rustc_macros:: extension;
62
62
use rustc_middle:: span_bug;
63
63
use rustc_middle:: ty:: { ResolverAstLowering , TyCtxt } ;
64
- use rustc_session:: parse:: { add_feature_diagnostics, feature_err } ;
64
+ use rustc_session:: parse:: add_feature_diagnostics;
65
65
use rustc_span:: symbol:: { Ident , Symbol , kw, sym} ;
66
66
use rustc_span:: { DUMMY_SP , DesugaringKind , Span } ;
67
67
use smallvec:: { SmallVec , smallvec} ;
@@ -2068,15 +2068,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
2068
2068
// `ExprKind::Paren(ExprKind::Underscore)` and should also be lowered to `GenericArg::Infer`
2069
2069
match c. value . peel_parens ( ) . kind {
2070
2070
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
- }
2080
2071
let ct_kind = hir:: ConstArgKind :: Infer ( self . lower_span ( c. value . span ) , ( ) ) ;
2081
2072
self . arena . alloc ( hir:: ConstArg { hir_id : self . lower_node_id ( c. id ) , kind : ct_kind } )
2082
2073
}
0 commit comments