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
77private import codeql.rust.elements.internal.generated.Raw
88private import codeql.rust.elements.internal.generated.Synth
99
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 ) {
1224 trait = any ( DynTraitTypeRepr dt ) .getTrait ( ) and
1325 (
1426 n = trait .getGenericParamList ( ) .getATypeParam ( ) or
You can’t perform that action at this time.
0 commit comments