@@ -45,7 +45,7 @@ use rustc_hir::def_id::{DefId, DefIdMap, DefIdSet, LOCAL_CRATE, LocalDefId};
45
45
use rustc_hir_analysis:: lower_ty;
46
46
use rustc_middle:: metadata:: Reexport ;
47
47
use rustc_middle:: middle:: resolve_bound_vars as rbv;
48
- use rustc_middle:: ty:: { self , AdtKind , GenericArgsRef , Ty , TyCtxt , TypeVisitableExt } ;
48
+ use rustc_middle:: ty:: { self , AdtKind , GenericArgsRef , Ty , TyCtxt , TypeVisitableExt , TypingMode } ;
49
49
use rustc_middle:: { bug, span_bug} ;
50
50
use rustc_span:: ExpnKind ;
51
51
use rustc_span:: hygiene:: { AstPass , MacroKind } ;
@@ -1862,7 +1862,7 @@ fn normalize<'tcx>(
1862
1862
use rustc_trait_selection:: traits:: query:: normalize:: QueryNormalizeExt ;
1863
1863
1864
1864
// Try to normalize `<X as Y>::T` to a type
1865
- let infcx = cx. tcx . infer_ctxt ( ) . build ( ) ;
1865
+ let infcx = cx. tcx . infer_ctxt ( ) . build ( TypingMode :: non_body_analysis ( ) ) ;
1866
1866
let normalized = infcx
1867
1867
. at ( & ObligationCause :: dummy ( ) , cx. param_env )
1868
1868
. query_normalize ( ty)
@@ -2398,7 +2398,7 @@ pub(crate) fn clean_variant_def_with_args<'tcx>(
2398
2398
use rustc_trait_selection:: infer:: TyCtxtInferExt ;
2399
2399
use rustc_trait_selection:: traits:: query:: normalize:: QueryNormalizeExt ;
2400
2400
2401
- let infcx = cx. tcx . infer_ctxt ( ) . build ( ) ;
2401
+ let infcx = cx. tcx . infer_ctxt ( ) . build ( TypingMode :: non_body_analysis ( ) ) ;
2402
2402
let kind = match variant. ctor_kind ( ) {
2403
2403
Some ( CtorKind :: Const ) => VariantKind :: CLike ,
2404
2404
Some ( CtorKind :: Fn ) => VariantKind :: Tuple (
0 commit comments