Skip to content

Commit

Permalink
Rewrite comments to include both dyn and opaque types
Browse files Browse the repository at this point in the history
  • Loading branch information
detrumi committed Feb 17, 2021
1 parent 815263d commit 29ba9ee
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions chalk-solve/src/clauses/super_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ pub(super) fn push_trait_super_clauses<I: Interner>(
trait_ref: TraitRef<I>,
) {
let interner = db.interner();
// We have some `dyn Trait`, and some `trait SuperTrait: WC`
// which is a super trait of `Trait` (including actually
// just being the same trait); then we want to push
// `Implemented(dyn Trait: SuperTrait) :- WC`.
// Given`trait SuperTrait: WC`, which is a super trait
// of `Trait` (including actually just being the same trait);
// then we want to push
// - for `dyn Trait`:
// `Implemented(dyn Trait: SuperTrait) :- WC`.
// - for placeholder `!T` of `opaque type T: Trait = HiddenTy`:
// `Implemented(!T: SuperTrait) :- WC`

let super_trait_refs =
super_traits(db, trait_ref.trait_id).substitute(interner, &trait_ref.substitution);
Expand Down

0 comments on commit 29ba9ee

Please sign in to comment.