@@ -78,7 +78,7 @@ pub(super) enum CandidateSource {
7878 /// let _y = x.clone();
7979 /// }
8080 /// ```
81- AliasBound ( usize ) ,
81+ AliasBound ,
8282}
8383
8484pub ( super ) trait GoalKind < ' tcx > : TypeFoldable < ' tcx > + Copy + Eq {
@@ -242,8 +242,6 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
242242 // NOTE: Alternatively we could call `evaluate_goal` here and only have a `Normalized` candidate.
243243 // This doesn't work as long as we use `CandidateSource` in winnowing.
244244 let goal = goal. with ( tcx, goal. predicate . with_self_ty ( tcx, normalized_ty) ) ;
245- // FIXME: This is broken if we care about the `usize` of `AliasBound` because the self type
246- // could be normalized to yet another projection with different item bounds.
247245 let normalized_candidates = self . assemble_and_evaluate_candidates ( goal) ;
248246 for mut normalized_candidate in normalized_candidates {
249247 normalized_candidate. result =
@@ -368,15 +366,14 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
368366 ty:: Alias ( _, alias_ty) => alias_ty,
369367 } ;
370368
371- for ( i , ( assumption, _) ) in self
369+ for ( assumption, _) in self
372370 . tcx ( )
373371 . bound_explicit_item_bounds ( alias_ty. def_id )
374372 . subst_iter_copied ( self . tcx ( ) , alias_ty. substs )
375- . enumerate ( )
376373 {
377374 match G :: consider_assumption ( self , goal, assumption) {
378375 Ok ( result) => {
379- candidates. push ( Candidate { source : CandidateSource :: AliasBound ( i ) , result } )
376+ candidates. push ( Candidate { source : CandidateSource :: AliasBound , result } )
380377 }
381378 Err ( NoSolution ) => ( ) ,
382379 }
0 commit comments