add xref to rust-guide

This commit is contained in:
Niko Matsakis
2018-03-15 14:27:00 -04:00
committed by GitHub
parent e8f3ed5db2
commit 4eaa85d3be

View File

@@ -117,6 +117,10 @@ fn program_clauses_for_impl<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId
if let ImplPolarity::Negative = tcx.impl_polarity(def_id) { if let ImplPolarity::Negative = tcx.impl_polarity(def_id) {
return Lrc::new(vec![]); return Lrc::new(vec![]);
} }
// Rule Implemented-From-Impl
//
// (see rustc guide)
let trait_ref = tcx.impl_trait_ref(def_id).unwrap(); let trait_ref = tcx.impl_trait_ref(def_id).unwrap();
let trait_ref = ty::TraitPredicate { trait_ref }.lower(); let trait_ref = ty::TraitPredicate { trait_ref }.lower();