Skip to content

Commit 6c02d1b

Browse files
authored
Merge pull request #22311 from hvitved/rust/to-owned-model
Rust: Add flow models for `ToOwned` trait
2 parents 82781b5 + 29335fd commit 6c02d1b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ extensions:
5656
# Vec
5757
- ["alloc::vec::from_elem", "Argument[0]", "ReturnValue.Element", "value", "manual"]
5858
- ["<alloc::vec::Vec as core::ops::deref::Deref>::deref", "Argument[self].Reference.Element", "ReturnValue.Reference.Element", "value", "manual"]
59+
# ToOwned
60+
- ["<_ as alloc::borrow::ToOwned>::to_owned", "Argument[self].Reference", "ReturnValue", "taint", "manual"]
61+
- ["<_ as alloc::borrow::ToOwned>::clone_into", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"]
5962
- addsTo:
6063
pack: codeql/rust-all
6164
extensible: neutralModel

0 commit comments

Comments
 (0)