You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/codeql/codeql-language-guides/customizing-library-models-for-rust.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Canonical paths take the following forms:
74
74
- **Free functions**: ``crate::module::function``, for example ``std::env::var`` or ``std::fs::read_to_string``.
75
75
- **Inherent methods**: ``<Type>::method``, for example ``<std::fs::File>::open``.
76
76
- **Trait methods with a concrete type**: ``<Type as Trait>::method``, for example ``<std::fs::File as std::io::Read>::read_to_end``.
77
-
- **Trait methods with a wildcard type**: ``<_ as Trait>::method``, for example ``<_ as core::clone::Clone>::clone``. This form matches any type that implements the trait and is useful for modeling broadly applicable trait methods. For a type that has a specific model (<Type as Trait>::method), that model will take precedence over the trait model.
77
+
- **Trait methods**: ``Trait::method``, for example ``core::clone::Clone::clone``. This form matches any type that implements the trait and is useful for modeling broadly applicable trait methods. For a type that has a specific model (``<Type as Trait>::method``), that model will take precedence over the trait model.
78
78
79
79
Examples of custom model definitions
80
80
-------------------------------------
@@ -270,10 +270,10 @@ We need to add tuples to the ``summaryModel(path, input, output, kind, provenanc
270
270
pack: codeql/rust-all
271
271
extensible: summaryModel
272
272
data:
273
-
- ["<_ as core::iter::traits::iterator::Iterator>::map", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"]
- The first value ``<_ as core::iter::traits::iterator::Iterator>::map`` is the canonical path. The ``<_ as Trait>::method`` form uses a wildcard type (``_``) to match any type that implements the ``Iterator`` trait.
276
+
- The first value ``core::iter::traits::iterator::Iterator::map`` is the canonical path. The ``Trait::method`` form matches any type that implements the ``Iterator`` trait.
277
277
- The second value ``Argument[self].Element`` is the access path to the input — the elements of the iterator (the receiver).
278
278
- The third value ``Argument[0].Parameter[0]`` is the access path to the output:
0 commit comments