@@ -1916,7 +1916,7 @@ private predicate methodCandidateTrait(Type type, Trait trait, string name, int
19161916}
19171917
19181918/**
1919- * Holds if `mc` has `rootType` as the root type of the reciever and the target
1919+ * Holds if `mc` has `rootType` as the root type of the receiver and the target
19201920 * method is named `name` and has arity `arity`
19211921 */
19221922pragma [ nomagic]
@@ -2193,8 +2193,8 @@ private module BlanketImplementation {
21932193 }
21942194
21952195 /**
2196- * Holds if `impl` is a blanket implementation for a type parameter with trait
2197- * bound `traitBound`.
2196+ * Holds if `impl` is a blanket implementation for a type parameter and
2197+ * `traitBound` is the first non-trivial trait bound of that type parameter .
21982198 */
21992199 private predicate blanketImplementationTraitBound ( ImplItemNode impl , Trait traitBound ) {
22002200 traitBound =
@@ -2214,7 +2214,7 @@ private module BlanketImplementation {
22142214
22152215 /**
22162216 * Holds if `impl` is a relevant blanket implementation that requires the
2217- * trait `trait ` and provides `f`, a method with name `name` and arity
2217+ * trait `traitBound ` and provides `f`, a method with name `name` and arity
22182218 * `arity`.
22192219 */
22202220 private predicate blanketImplementationMethod (
@@ -2233,8 +2233,8 @@ private module BlanketImplementation {
22332233 f = impl .resolveTraitTy ( ) .getAssocItem ( name )
22342234 ) and
22352235 // If the method is already available through one of the trait bounds on the
2236- // type parameter (because they share a common super trait) then ignore
2237- // it.
2236+ // type parameter (because they implement the trait targeted by the impl
2237+ // block) then ignore it.
22382238 not impl .getBlanketImplementationTypeParam ( ) .resolveABound ( ) .( TraitItemNode ) .getASuccessor ( name ) =
22392239 f
22402240 }
0 commit comments