Skip to content

Commit

Permalink
add xref to rust-guide
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Mar 15, 2018
1 parent e8f3ed5 commit 4eaa85d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc_traits/lowering.rs
Expand Up @@ -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) {
return Lrc::new(vec![]);
}

// Rule Implemented-From-Impl
//
// (see rustc guide)

let trait_ref = tcx.impl_trait_ref(def_id).unwrap();
let trait_ref = ty::TraitPredicate { trait_ref }.lower();
Expand Down

0 comments on commit 4eaa85d

Please sign in to comment.