Uh oh!
There was an error while loading. Please reload this page.
Rust: Change canonical paths for trait items - #22376
Conversation
Use `crate::Trait::foo` instead of `<_ as crate::Trait>::foo` for trait items.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5a15104d-a9a3-4506-8325-203af6db47f8
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5a15104d-a9a3-4506-8325-203af6db47f8
There was a problem hiding this comment.
Pull request overview
Changes Rust trait-item canonical paths to the simpler Trait::item format and migrates affected models, documentation, and generated expectations.
Changes:
- Updates canonical-path generation for trait items.
- Migrates Rust library and test models to the new format.
- Updates documentation, change notes, and generated expectations.
Show a summary per file
| File | Description |
|---|---|
rust/ql/test/query-tests/security/CWE-918/RequestForgery.expected | Regenerates request-forgery expectations. |
rust/ql/test/query-tests/security/CWE-798/HardcodedCryptographicValue.expected | Regenerates cryptographic-value expectations. |
rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected | Regenerates allocation-size expectations. |
rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected | Regenerates logging expectations. |
rust/ql/test/query-tests/security/CWE-117/LogInjection.expected | Regenerates log-injection expectations. |
rust/ql/test/query-tests/security/CWE-079/warp/XSS.expected | Regenerates Warp XSS expectations. |
rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected | Regenerates tainted-path expectations. |
rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected | Updates string data-flow expectations. |
rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected | Updates web-framework model expectations. |
rust/ql/test/library-tests/dataflow/sources/env/InlineFlow.expected | Updates environment-source expectations. |
rust/ql/test/library-tests/dataflow/sources/database/InlineFlow.expected | Updates database-source expectations. |
rust/ql/test/library-tests/dataflow/models/models.ext.yml | Migrates test extension models. |
rust/ql/test/library-tests/dataflow/models/models.expected | Regenerates model expectations. |
rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected | Updates modeled-flow expectations. |
rust/ql/test/library-tests/dataflow/local/inline-flow.expected | Updates local-flow expectations. |
rust/ql/test/library-tests/dataflow/global/inline-flow.expected | Updates global-flow expectations. |
rust/ql/test/library-tests/dataflow/collections/inline-flow.expected | Updates collection-flow expectations. |
rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected | Verifies new extracted canonical paths. |
rust/ql/lib/codeql/rust/internal/PathResolution.qll | Implements the new trait-item path format. |
rust/ql/lib/codeql/rust/frameworks/warp.model.yml | Migrates Warp trait models. |
rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml | Migrates Tokio I/O trait models. |
rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml | Migrates standard I/O trait models. |
rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml | Migrates core trait models. |
rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml | Migrates allocation trait models. |
rust/ql/lib/codeql/rust/frameworks/sqlx.model.yml | Migrates SQLx trait models. |
rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml | Migrates RustCrypto trait models. |
rust/ql/lib/codeql/rust/frameworks/mysql.model.yml | Migrates MySQL trait models. |
rust/ql/lib/codeql/rust/frameworks/mysql-async.model.yml | Migrates asynchronous MySQL models. |
rust/ql/lib/codeql/rust/frameworks/futures.model.yml | Migrates Futures I/O models. |
rust/ql/lib/codeql/rust/frameworks/asyncstd/io.model.yml | Migrates async-std I/O models. |
rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll | Updates an internal path reference. |
rust/ql/lib/change-notes/2026-08-19-trait-canonical-paths.md | Documents the model migration. |
docs/codeql/codeql-language-guides/customizing-library-models-for-rust.rst | Documents the new canonical-path syntax. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 39/39 changed files
- Comments generated: 1
- Review effort level: Balanced
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
geoffw0
commented
Aug 20, 2026
This may have already been discussed but ... is there an issue with ambiguity with |
hvitved
commented
Aug 20, 2026
I don't think that is possible, since that would require |
redsun82
commented
Aug 20, 2026
yep, that's my understanding as well. |
Uh oh!
There was an error while loading. Please reload this page.
geoffw0
commented
Aug 20, 2026
Thanks. 👍 |
Summary
crate::Trait::itemcanonical paths for Rust trait items instead of<_ as crate::Trait>::itemTesting
codeql test run --learn