@@ -271,7 +271,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
271271 }
272272
273273 fn normalize ( mut self ) -> Vec < traits:: PredicateObligation < ' tcx > > {
274- let cause = self . cause ( traits:: MiscObligation ) ;
274+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
275275 let infcx = & mut self . infcx ;
276276 let param_env = self . param_env ;
277277 let mut obligations = Vec :: with_capacity ( self . out . len ( ) ) ;
@@ -385,7 +385,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
385385 self . out . extend ( obligations) ;
386386
387387 let tcx = self . tcx ( ) ;
388- let cause = self . cause ( traits:: MiscObligation ) ;
388+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
389389 let param_env = self . param_env ;
390390 let depth = self . recursion_depth ;
391391
@@ -445,7 +445,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
445445 let predicate =
446446 ty:: Binder :: dummy ( ty:: PredicateKind :: ConstEvaluatable ( uv. shrink ( ) ) )
447447 . to_predicate ( self . tcx ( ) ) ;
448- let cause = self . cause ( traits:: MiscObligation ) ;
448+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
449449 self . out . push ( traits:: Obligation :: with_depth (
450450 cause,
451451 self . recursion_depth ,
@@ -457,7 +457,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
457457 let resolved = self . infcx . shallow_resolve ( infer) ;
458458 // the `InferConst` changed, meaning that we made progress.
459459 if resolved != infer {
460- let cause = self . cause ( traits:: MiscObligation ) ;
460+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
461461
462462 let resolved_constant = self . infcx . tcx . mk_const ( ty:: ConstS {
463463 kind : ty:: ConstKind :: Infer ( resolved) ,
@@ -648,7 +648,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
648648 let defer_to_coercion = self . tcx ( ) . features ( ) . object_safe_for_dispatch ;
649649
650650 if !defer_to_coercion {
651- let cause = self . cause ( traits:: MiscObligation ) ;
651+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
652652 let component_traits = data. auto_traits ( ) . chain ( data. principal_def_id ( ) ) ;
653653 let tcx = self . tcx ( ) ;
654654 self . out . extend ( component_traits. map ( |did| {
@@ -679,7 +679,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
679679 let ty = self . infcx . shallow_resolve ( ty) ;
680680 if let ty:: Infer ( ty:: TyVar ( _) ) = ty. kind ( ) {
681681 // Not yet resolved, but we've made progress.
682- let cause = self . cause ( traits:: MiscObligation ) ;
682+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
683683 self . out . push ( traits:: Obligation :: with_depth (
684684 cause,
685685 self . recursion_depth ,
0 commit comments