File tree 1 file changed +1
-4
lines changed
compiler/rustc_trait_selection/src/traits
1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ use std::fmt::Debug;
27
27
use std:: ops:: ControlFlow ;
28
28
29
29
use rustc_errors:: ErrorGuaranteed ;
30
- use rustc_hir:: def:: DefKind ;
31
30
pub use rustc_infer:: traits:: * ;
32
31
use rustc_middle:: query:: Providers ;
33
32
use rustc_middle:: span_bug;
@@ -372,9 +371,7 @@ pub fn normalize_param_env_or_error<'tcx>(
372
371
// should actually be okay since without `feature(generic_const_exprs)` the only
373
372
// const arguments that have a non-empty param env are array repeat counts. These
374
373
// do not appear in the type system though.
375
- if let ty:: ConstKind :: Unevaluated ( uv) = c. kind ( )
376
- && self . 0 . def_kind ( uv. def ) == DefKind :: AnonConst
377
- {
374
+ if let ty:: ConstKind :: Unevaluated ( _) = c. kind ( ) {
378
375
let infcx = self . 0 . infer_ctxt ( ) . build ( TypingMode :: non_body_analysis ( ) ) ;
379
376
let c = evaluate_const ( & infcx, c, ty:: ParamEnv :: empty ( ) ) ;
380
377
// We should never wind up with any `infcx` local state when normalizing anon consts
You can’t perform that action at this time.
0 commit comments