@@ -165,13 +165,12 @@ struct PickDiagHints<'a, 'tcx> {
165165
166166 /// Collects near misses when trait bounds for type parameters are unsatisfied and is only used
167167 /// for error reporting
168- unsatisfied_predicates : & ' a mut Vec < (
169- ty:: Predicate < ' tcx > ,
170- Option < ty:: Predicate < ' tcx > > ,
171- Option < ObligationCause < ' tcx > > ,
172- ) > ,
168+ unsatisfied_predicates : & ' a mut UnsatisfiedPredicates < ' tcx > ,
173169}
174170
171+ pub ( crate ) type UnsatisfiedPredicates < ' tcx > =
172+ Vec < ( ty:: Predicate < ' tcx > , Option < ty:: Predicate < ' tcx > > , Option < ObligationCause < ' tcx > > ) > ;
173+
175174/// Criteria to apply when searching for a given Pick. This is used during
176175/// the search for potentially shadowed methods to ensure we don't search
177176/// more candidates than strictly necessary.
@@ -1212,11 +1211,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
12121211
12131212 fn pick_core (
12141213 & self ,
1215- unsatisfied_predicates : & mut Vec < (
1216- ty:: Predicate < ' tcx > ,
1217- Option < ty:: Predicate < ' tcx > > ,
1218- Option < ObligationCause < ' tcx > > ,
1219- ) > ,
1214+ unsatisfied_predicates : & mut UnsatisfiedPredicates < ' tcx > ,
12201215 ) -> Option < PickResult < ' tcx > > {
12211216 // Pick stable methods only first, and consider unstable candidates if not found.
12221217 self . pick_all_method ( & mut PickDiagHints {
@@ -1889,11 +1884,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
18891884 self_ty : Ty < ' tcx > ,
18901885 instantiate_self_ty_obligations : & [ PredicateObligation < ' tcx > ] ,
18911886 probe : & Candidate < ' tcx > ,
1892- possibly_unsatisfied_predicates : & mut Vec < (
1893- ty:: Predicate < ' tcx > ,
1894- Option < ty:: Predicate < ' tcx > > ,
1895- Option < ObligationCause < ' tcx > > ,
1896- ) > ,
1887+ possibly_unsatisfied_predicates : & mut UnsatisfiedPredicates < ' tcx > ,
18971888 ) -> ProbeResult {
18981889 self . probe ( |snapshot| {
18991890 let outer_universe = self . universe ( ) ;
0 commit comments