@@ -45,7 +45,7 @@ use rustc_hir::def_id::{DefId, DefIdMap, DefIdSet, LOCAL_CRATE, LocalDefId};
4545use rustc_hir_analysis:: lower_ty;
4646use rustc_middle:: metadata:: Reexport ;
4747use 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 } ;
4949use rustc_middle:: { bug, span_bug} ;
5050use rustc_span:: ExpnKind ;
5151use rustc_span:: hygiene:: { AstPass , MacroKind } ;
@@ -1863,7 +1863,7 @@ fn normalize<'tcx>(
18631863 use rustc_trait_selection:: traits:: query:: normalize:: QueryNormalizeExt ;
18641864
18651865 // Try to normalize `<X as Y>::T` to a type
1866- let infcx = cx. tcx . infer_ctxt ( ) . build ( ) ;
1866+ let infcx = cx. tcx . infer_ctxt ( ) . build ( TypingMode :: non_body_analysis ( ) ) ;
18671867 let normalized = infcx
18681868 . at ( & ObligationCause :: dummy ( ) , cx. param_env )
18691869 . query_normalize ( ty)
@@ -2399,7 +2399,7 @@ pub(crate) fn clean_variant_def_with_args<'tcx>(
23992399 use rustc_trait_selection:: infer:: TyCtxtInferExt ;
24002400 use rustc_trait_selection:: traits:: query:: normalize:: QueryNormalizeExt ;
24012401
2402- let infcx = cx. tcx . infer_ctxt ( ) . build ( ) ;
2402+ let infcx = cx. tcx . infer_ctxt ( ) . build ( TypingMode :: non_body_analysis ( ) ) ;
24032403 let kind = match variant. ctor_kind ( ) {
24042404 Some ( CtorKind :: Const ) => VariantKind :: CLike ,
24052405 Some ( CtorKind :: Fn ) => VariantKind :: Tuple (
0 commit comments