1
1
//! A utility module to inspect currently ambiguous obligations in the current context.
2
2
3
- use rustc_infer:: traits:: { self , ObligationCause } ;
3
+ use rustc_infer:: traits:: { self , ObligationCause , PredicateObligations } ;
4
4
use rustc_middle:: traits:: solve:: Goal ;
5
5
use rustc_middle:: ty:: { self , Ty , TypeVisitableExt } ;
6
6
use rustc_span:: Span ;
@@ -15,10 +15,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
15
15
/// Returns a list of all obligations whose self type has been unified
16
16
/// with the unconstrained type `self_ty`.
17
17
#[ instrument( skip( self ) , level = "debug" ) ]
18
- pub ( crate ) fn obligations_for_self_ty (
19
- & self ,
20
- self_ty : ty:: TyVid ,
21
- ) -> Vec < traits:: PredicateObligation < ' tcx > > {
18
+ pub ( crate ) fn obligations_for_self_ty ( & self , self_ty : ty:: TyVid ) -> PredicateObligations < ' tcx > {
22
19
if self . next_trait_solver ( ) {
23
20
self . obligations_for_self_ty_next ( self_ty)
24
21
} else {
@@ -75,7 +72,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
75
72
pub ( crate ) fn obligations_for_self_ty_next (
76
73
& self ,
77
74
self_ty : ty:: TyVid ,
78
- ) -> Vec < traits :: PredicateObligation < ' tcx > > {
75
+ ) -> PredicateObligations < ' tcx > {
79
76
let obligations = self . fulfillment_cx . borrow ( ) . pending_obligations ( ) ;
80
77
debug ! ( ?obligations) ;
81
78
let mut obligations_for_self_ty = vec ! [ ] ;
@@ -103,7 +100,7 @@ struct NestedObligationsForSelfTy<'a, 'tcx> {
103
100
fcx : & ' a FnCtxt < ' a , ' tcx > ,
104
101
self_ty : ty:: TyVid ,
105
102
root_cause : & ' a ObligationCause < ' tcx > ,
106
- obligations_for_self_ty : & ' a mut Vec < traits :: PredicateObligation < ' tcx > > ,
103
+ obligations_for_self_ty : & ' a mut PredicateObligations < ' tcx > ,
107
104
}
108
105
109
106
impl < ' a , ' tcx > ProofTreeVisitor < ' tcx > for NestedObligationsForSelfTy < ' a , ' tcx > {
0 commit comments