Update docs/codeql/codeql-language-guides/customizing-library-models-for-rust.rst

Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
This commit is contained in:
Florin Coada
2026-05-13 11:44:43 +01:00
committed by GitHub
parent d5b690caf8
commit 8abd3b93c9

View File

@@ -74,7 +74,7 @@ Canonical paths take the following forms:
- **Free functions**: ``crate::module::function``, for example ``std::env::var`` or ``std::fs::read_to_string``.
- **Inherent methods**: ``<Type>::method``, for example ``<std::fs::File>::open``.
- **Trait methods with a concrete type**: ``<Type as Trait>::method``, for example ``<std::fs::File as std::io::Read>::read_to_end``.
- **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.
- **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.
Examples of custom model definitions
-------------------------------------