@@ -271,7 +271,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
271
271
}
272
272
273
273
fn normalize ( mut self ) -> Vec < traits:: PredicateObligation < ' tcx > > {
274
- let cause = self . cause ( traits:: MiscObligation ) ;
274
+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
275
275
let infcx = & mut self . infcx ;
276
276
let param_env = self . param_env ;
277
277
let mut obligations = Vec :: with_capacity ( self . out . len ( ) ) ;
@@ -385,7 +385,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
385
385
self . out . extend ( obligations) ;
386
386
387
387
let tcx = self . tcx ( ) ;
388
- let cause = self . cause ( traits:: MiscObligation ) ;
388
+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
389
389
let param_env = self . param_env ;
390
390
let depth = self . recursion_depth ;
391
391
@@ -445,7 +445,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
445
445
let predicate =
446
446
ty:: Binder :: dummy ( ty:: PredicateKind :: ConstEvaluatable ( uv. shrink ( ) ) )
447
447
. to_predicate ( self . tcx ( ) ) ;
448
- let cause = self . cause ( traits:: MiscObligation ) ;
448
+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
449
449
self . out . push ( traits:: Obligation :: with_depth (
450
450
cause,
451
451
self . recursion_depth ,
@@ -457,7 +457,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
457
457
let resolved = self . infcx . shallow_resolve ( infer) ;
458
458
// the `InferConst` changed, meaning that we made progress.
459
459
if resolved != infer {
460
- let cause = self . cause ( traits:: MiscObligation ) ;
460
+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
461
461
462
462
let resolved_constant = self . infcx . tcx . mk_const ( ty:: ConstS {
463
463
kind : ty:: ConstKind :: Infer ( resolved) ,
@@ -648,7 +648,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
648
648
let defer_to_coercion = self . tcx ( ) . features ( ) . object_safe_for_dispatch ;
649
649
650
650
if !defer_to_coercion {
651
- let cause = self . cause ( traits:: MiscObligation ) ;
651
+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
652
652
let component_traits = data. auto_traits ( ) . chain ( data. principal_def_id ( ) ) ;
653
653
let tcx = self . tcx ( ) ;
654
654
self . out . extend ( component_traits. map ( |did| {
@@ -679,7 +679,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
679
679
let ty = self . infcx . shallow_resolve ( ty) ;
680
680
if let ty:: Infer ( ty:: TyVar ( _) ) = ty. kind ( ) {
681
681
// Not yet resolved, but we've made progress.
682
- let cause = self . cause ( traits:: MiscObligation ) ;
682
+ let cause = self . cause ( traits:: WellFormed ( None ) ) ;
683
683
self . out . push ( traits:: Obligation :: with_depth (
684
684
cause,
685
685
self . recursion_depth ,
0 commit comments