File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
rust/ql/lib/codeql/rust/internal Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,20 @@ private import codeql.rust.internal.CachedStages
7
7
private import codeql.rust.elements.internal.generated.Raw
8
8
private import codeql.rust.elements.internal.generated.Synth
9
9
10
- /** Holds if a dyn trait type should have a type parameter associated with `n`. */
11
- predicate dynTraitTypeParameter ( Trait trait , AstNode n ) {
10
+ /**
11
+ * Holds if a dyn trait type should have a type parameter associated with `n`. A
12
+ * dyn trait type inherits the type parameters of the trait it implements. That
13
+ * includes the type parameters corresponding to associated types.
14
+ *
15
+ * For instance in
16
+ * ```rust
17
+ * trait SomeTrait<A> {
18
+ * type AssociatedType;
19
+ * }
20
+ * ```
21
+ * this predicate holds for the nodes `A` and `type AssociatedType`.
22
+ */
23
+ private predicate dynTraitTypeParameter ( Trait trait , AstNode n ) {
12
24
trait = any ( DynTraitTypeRepr dt ) .getTrait ( ) and
13
25
(
14
26
n = trait .getGenericParamList ( ) .getATypeParam ( ) or
You can’t perform that action at this time.
0 commit comments