@@ -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 } ;
@@ -1863,7 +1863,7 @@ fn normalize<'tcx>(
1863
1863
use rustc_trait_selection:: traits:: query:: normalize:: QueryNormalizeExt ;
1864
1864
1865
1865
// 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 ( ) ) ;
1867
1867
let normalized = infcx
1868
1868
. at ( & ObligationCause :: dummy ( ) , cx. param_env )
1869
1869
. query_normalize ( ty)
@@ -2399,7 +2399,7 @@ pub(crate) fn clean_variant_def_with_args<'tcx>(
2399
2399
use rustc_trait_selection:: infer:: TyCtxtInferExt ;
2400
2400
use rustc_trait_selection:: traits:: query:: normalize:: QueryNormalizeExt ;
2401
2401
2402
- let infcx = cx. tcx . infer_ctxt ( ) . build ( ) ;
2402
+ let infcx = cx. tcx . infer_ctxt ( ) . build ( TypingMode :: non_body_analysis ( ) ) ;
2403
2403
let kind = match variant. ctor_kind ( ) {
2404
2404
Some ( CtorKind :: Const ) => VariantKind :: CLike ,
2405
2405
Some ( CtorKind :: Fn ) => VariantKind :: Tuple (
0 commit comments