Workaround privacy bug or something else; filter_to_traits() fails to

link, but this does the same thing.
This commit is contained in:
Niko Matsakis 2015-01-06 17:53:14 -05:00
parent 3f1cf328b3
commit ab02f9e42a

View file

@ -645,7 +645,7 @@ impl<'a,'tcx> ProbeContext<'a,'tcx> {
predicates.repr(self.tcx()));
for poly_bound in
traits::elaborate_predicates(self.tcx(), predicates)
.filter_map(|p| p.to_opt_poly_trait_ref()) // TODO filter_to_traits()
.filter_map(|p| p.to_opt_poly_trait_ref())
.filter(|b| b.def_id() == trait_def_id)
{
let bound = self.erase_late_bound_regions(&poly_bound);