Skip to content

Commit 7ae1c6b

Browse files
committed
Remove a TODO now that we handle normalization-derived bounds properly.
1 parent cadd433 commit 7ae1c6b

File tree

1 file changed

+2
-8
lines changed
  • src/librustc_typeck/check

1 file changed

+2
-8
lines changed

src/librustc_typeck/check/wf.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,8 @@ impl<'cx,'tcx> BoundsChecker<'cx,'tcx> {
269269
pub fn check_trait_ref(&mut self, trait_ref: &ty::TraitRef<'tcx>) {
270270
let trait_def = ty::lookup_trait_def(self.fcx.tcx(), trait_ref.def_id);
271271

272-
// TODO uncommented this line causes failures because the impl
273-
// obligations are not registered when we do a projection, and
274-
// in this case it's those obligations that make the link
275-
// between the normalized type ($1) and the result
276-
//
277-
// let bounds = self.fcx.instantiate_bounds(self.span, trait_ref.substs, &trait_def.generics);
278-
279-
let bounds = trait_def.generics.to_bounds(self.fcx.tcx(), trait_ref.substs);
272+
let bounds = self.fcx.instantiate_bounds(self.span, trait_ref.substs, &trait_def.generics);
273+
280274
self.fcx.add_obligations_for_parameters(
281275
traits::ObligationCause::new(
282276
self.span,

0 commit comments

Comments
 (0)