From 7ae1c6bc269cd0fddb45590a91d77e39b47a4965 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 31 Dec 2014 16:02:58 -0500 Subject: [PATCH] Remove a TODO now that we handle normalization-derived bounds properly. --- src/librustc_typeck/check/wf.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/librustc_typeck/check/wf.rs b/src/librustc_typeck/check/wf.rs index 2d9b243e00e..410697b0aca 100644 --- a/src/librustc_typeck/check/wf.rs +++ b/src/librustc_typeck/check/wf.rs @@ -269,14 +269,8 @@ impl<'cx,'tcx> BoundsChecker<'cx,'tcx> { pub fn check_trait_ref(&mut self, trait_ref: &ty::TraitRef<'tcx>) { let trait_def = ty::lookup_trait_def(self.fcx.tcx(), trait_ref.def_id); - // TODO uncommented this line causes failures because the impl - // obligations are not registered when we do a projection, and - // in this case it's those obligations that make the link - // between the normalized type ($1) and the result - // - // let bounds = self.fcx.instantiate_bounds(self.span, trait_ref.substs, &trait_def.generics); + let bounds = self.fcx.instantiate_bounds(self.span, trait_ref.substs, &trait_def.generics); - let bounds = trait_def.generics.to_bounds(self.fcx.tcx(), trait_ref.substs); self.fcx.add_obligations_for_parameters( traits::ObligationCause::new( self.span,