Skip to content

Commit 26085a5

Browse files
paldepindCopilot
andcommitted
Rust: Refresh expectations for regenerated models
Record the model and provenance changes from regeneration and the targeted conversion summaries. Preserve all existing fixture annotations and keep testFailures sections empty. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 786f0f17-6512-4098-8c92-7721e13b78b2
1 parent 2f2a846 commit 26085a5

10 files changed

Lines changed: 270 additions & 224 deletions

File tree

‎rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,14 @@ localStep
350350
| main.rs:291:9:291:10 | s1 | main.rs:291:9:291:10 | [SSA] s1 |
351351
| main.rs:291:9:291:10 | s1 | main.rs:291:9:291:10 | s1 |
352352
| main.rs:291:14:291:29 | Some(...) | main.rs:291:9:291:10 | s1 |
353+
| main.rs:292:10:292:32 | s1.unwrap_or_else(...) | main.rs:292:10:292:32 | s1.unwrap_or_else(...) |
354+
| main.rs:292:10:292:32 | s1.unwrap_or_else(...) | main.rs:292:10:292:32 | s1.unwrap_or_else(...) |
353355
| main.rs:294:9:294:10 | [SSA] s2 | main.rs:295:10:295:11 | s2 |
354356
| main.rs:294:9:294:10 | s2 | main.rs:294:9:294:10 | [SSA] s2 |
355357
| main.rs:294:9:294:10 | s2 | main.rs:294:9:294:10 | s2 |
356358
| main.rs:294:14:294:17 | None | main.rs:294:9:294:10 | s2 |
359+
| main.rs:295:10:295:41 | s2.unwrap_or_else(...) | main.rs:295:10:295:41 | s2.unwrap_or_else(...) |
360+
| main.rs:295:10:295:41 | s2.unwrap_or_else(...) | main.rs:295:10:295:41 | s2.unwrap_or_else(...) |
357361
| main.rs:299:9:299:10 | [SSA] s1 | main.rs:301:14:301:15 | s1 |
358362
| main.rs:299:9:299:10 | s1 | main.rs:299:9:299:10 | [SSA] s1 |
359363
| main.rs:299:9:299:10 | s1 | main.rs:299:9:299:10 | s1 |
@@ -693,6 +697,8 @@ localStep
693697
| main.rs:482:17:482:17 | n | main.rs:482:17:482:17 | [SSA] n |
694698
| main.rs:482:17:482:17 | n | main.rs:482:17:482:17 | n |
695699
| main.rs:482:21:482:68 | name.unwrap_or_else(...) | main.rs:482:17:482:17 | n |
700+
| main.rs:482:21:482:68 | name.unwrap_or_else(...) | main.rs:482:21:482:68 | name.unwrap_or_else(...) |
701+
| main.rs:482:21:482:68 | name.unwrap_or_else(...) | main.rs:482:21:482:68 | name.unwrap_or_else(...) |
696702
| main.rs:482:41:482:67 | [post] default_name | main.rs:480:9:480:20 | SSA phi read(default_name) |
697703
| main.rs:482:41:482:67 | closure self in \|...\| ... | main.rs:482:44:482:55 | this |
698704
| main.rs:482:41:482:67 | default_name | main.rs:480:9:480:20 | SSA phi read(default_name) |

‎rust/ql/test/library-tests/dataflow/local/inline-flow.expected‎

Lines changed: 67 additions & 64 deletions
Large diffs are not rendered by default.

‎rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected‎

Lines changed: 55 additions & 53 deletions
Large diffs are not rendered by default.

‎rust/ql/test/library-tests/dataflow/sources/env/InlineFlow.expected‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ models
88
| 7 | Source: std::env::var_os; ReturnValue.Field[core::option::Option::Some(0)]; environment |
99
| 8 | Source: std::env::vars; ReturnValue.Element; environment |
1010
| 9 | Source: std::env::vars_os; ReturnValue.Element; environment |
11-
| 10 | Summary: <alloc::string::String as core::ops::deref::Deref>::deref; Argument[self]; ReturnValue; value |
11+
| 10 | Summary: <alloc::string::String as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue.Reference; taint |
1212
| 11 | Summary: <core::iter::traits::iterator::Iterator>::collect; Argument[self].Element; ReturnValue.Element; value |
1313
| 12 | Summary: <core::iter::traits::iterator::Iterator>::nth; Argument[self].Reference.Element; ReturnValue.Field[core::option::Option::Some(0)]; value |
1414
| 13 | Summary: <core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value |

‎rust/ql/test/library-tests/dataflow/sources/file/InlineFlow.expected‎

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,21 @@ models
3131
| 30 | Summary: <std::ffi::os_str::OsString>::into_string; Argument[self].Field[std::ffi::os_str::OsString::inner].Field[std::sys::os_str::bytes::Buf::inner]; ReturnValue.Field[core::result::Result::Ok(0)].Field[alloc::string::String::vec]; value |
3232
| 31 | Summary: <std::fs::File as alloc::io::read::Read>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint |
3333
| 32 | Summary: <std::fs::File as alloc::io::read::Read>::read_to_string; Argument[self].Reference; Argument[0].Reference; taint |
34-
| 33 | Summary: <std::path::PathBuf as core::convert::From>::from; Argument[0]; ReturnValue.Field[std::path::PathBuf::inner]; value |
35-
| 34 | Summary: <std::path::PathBuf as core::ops::deref::Deref>::deref; Argument[self].Reference.Field[std::path::PathBuf::inner]; ReturnValue.Reference; value |
36-
| 35 | Summary: <std::path::PathBuf>::as_path; Argument[self].Reference; ReturnValue.Reference; value |
37-
| 36 | Summary: <std::path::PathBuf>::into_boxed_path; Argument[self]; ReturnValue.Field[alloc::boxed::Box(0)]; taint |
38-
| 37 | Summary: <std::path::PathBuf>::into_os_string; Argument[self].Field[std::path::PathBuf::inner]; ReturnValue; value |
39-
| 38 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint |
40-
| 39 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_buf; Argument[self].Reference; Argument[0].Reference; taint |
41-
| 40 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_exact; Argument[self].Reference; Argument[0].Reference; taint |
42-
| 41 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_f32; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
43-
| 42 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_i16; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
44-
| 43 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
45-
| 44 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint |
46-
| 45 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string; Argument[self].Reference; Argument[0].Reference; taint |
47-
| 46 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_u8; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
34+
| 33 | Summary: <std::path::PathBuf as core::convert::From>::from; Argument[0].Field[alloc::boxed::Box(0)]; ReturnValue; value |
35+
| 34 | Summary: <std::path::PathBuf as core::convert::From>::from; Argument[0]; ReturnValue.Field[std::path::PathBuf::inner]; value |
36+
| 35 | Summary: <std::path::PathBuf as core::ops::deref::Deref>::deref; Argument[self].Reference.Field[std::path::PathBuf::inner]; ReturnValue.Reference; value |
37+
| 36 | Summary: <std::path::PathBuf>::as_path; Argument[self].Reference; ReturnValue.Reference; value |
38+
| 37 | Summary: <std::path::PathBuf>::into_boxed_path; Argument[self]; ReturnValue.Field[alloc::boxed::Box(0)]; taint |
39+
| 38 | Summary: <std::path::PathBuf>::into_os_string; Argument[self].Field[std::path::PathBuf::inner]; ReturnValue; value |
40+
| 39 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint |
41+
| 40 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_buf; Argument[self].Reference; Argument[0].Reference; taint |
42+
| 41 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_exact; Argument[self].Reference; Argument[0].Reference; taint |
43+
| 42 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_f32; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
44+
| 43 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_i16; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
45+
| 44 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
46+
| 45 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint |
47+
| 46 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string; Argument[self].Reference; Argument[0].Reference; taint |
48+
| 47 | Summary: <tokio::io::util::async_read_ext::AsyncReadExt>::read_u8; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint |
4849
edges
4950
| test.rs:12:13:12:18 | buffer | test.rs:13:14:13:19 | buffer | provenance | |
5051
| test.rs:12:31:12:55 | ...::read(...) | test.rs:12:31:12:55 | ...::read(...) [Ok] | provenance | Src:MaD:11 |
@@ -73,23 +74,24 @@ edges
7374
| test.rs:30:20:30:27 | e.path() | test.rs:30:13:30:16 | path | provenance | Src:MaD:4 |
7475
| test.rs:31:14:31:17 | path | test.rs:31:14:31:25 | path.clone() | provenance | MaD:26 |
7576
| test.rs:32:14:32:17 | path | test.rs:32:14:32:25 | path.clone() | provenance | MaD:26 |
76-
| test.rs:32:14:32:25 | path.clone() | test.rs:32:14:32:35 | ... .as_path() | provenance | MaD:35 |
77+
| test.rs:32:14:32:25 | path.clone() | test.rs:32:14:32:35 | ... .as_path() | provenance | MaD:36 |
7778
| test.rs:33:14:33:17 | path | test.rs:33:14:33:25 | path.clone() | provenance | MaD:26 |
78-
| test.rs:33:14:33:25 | path.clone() | test.rs:33:14:33:42 | ... .into_os_string() | provenance | MaD:37 |
79+
| test.rs:33:14:33:25 | path.clone() | test.rs:33:14:33:42 | ... .into_os_string() | provenance | MaD:38 |
7980
| test.rs:34:39:34:42 | path | test.rs:34:39:34:50 | path.clone() | provenance | MaD:26 |
80-
| test.rs:34:39:34:50 | path.clone() | test.rs:34:39:34:68 | ... .into_boxed_path() [Box(0)] | provenance | MaD:36 |
81+
| test.rs:34:39:34:50 | path.clone() | test.rs:34:39:34:68 | ... .into_boxed_path() [Box(0)] | provenance | MaD:37 |
8182
| test.rs:34:39:34:68 | ... .into_boxed_path() [Box(0)] | test.rs:34:14:34:69 | ...::from(...) | provenance | MaD:33 |
83+
| test.rs:34:39:34:68 | ... .into_boxed_path() [Box(0)] | test.rs:34:14:34:69 | ...::from(...) | provenance | MaD:34 |
8284
| test.rs:35:14:35:17 | path | test.rs:35:14:35:25 | path.clone() | provenance | MaD:26 |
83-
| test.rs:35:14:35:25 | path.clone() | test.rs:35:14:35:37 | ... .as_os_str() | provenance | MaD:34 |
85+
| test.rs:35:14:35:25 | path.clone() | test.rs:35:14:35:37 | ... .as_os_str() | provenance | MaD:35 |
8486
| test.rs:36:14:36:17 | path | test.rs:36:14:36:25 | path.clone() | provenance | MaD:26 |
85-
| test.rs:36:14:36:25 | path.clone() | test.rs:36:14:36:41 | ... .as_mut_os_str() | provenance | MaD:34 |
86-
| test.rs:37:14:37:17 | path | test.rs:37:14:37:26 | path.to_str() | provenance | MaD:34 |
87-
| test.rs:38:14:38:17 | path | test.rs:38:14:38:31 | path.to_path_buf() | provenance | MaD:34 |
88-
| test.rs:39:14:39:17 | path | test.rs:39:14:39:29 | path.file_name() [Some, &ref] | provenance | MaD:34 |
87+
| test.rs:36:14:36:25 | path.clone() | test.rs:36:14:36:41 | ... .as_mut_os_str() | provenance | MaD:35 |
88+
| test.rs:37:14:37:17 | path | test.rs:37:14:37:26 | path.to_str() | provenance | MaD:35 |
89+
| test.rs:38:14:38:17 | path | test.rs:38:14:38:31 | path.to_path_buf() | provenance | MaD:35 |
90+
| test.rs:39:14:39:17 | path | test.rs:39:14:39:29 | path.file_name() [Some, &ref] | provenance | MaD:35 |
8991
| test.rs:39:14:39:29 | path.file_name() [Some, &ref] | test.rs:39:14:39:38 | ... .unwrap() | provenance | MaD:27 |
90-
| test.rs:40:14:40:17 | path | test.rs:40:14:40:29 | path.extension() [Some, &ref] | provenance | MaD:34 |
92+
| test.rs:40:14:40:17 | path | test.rs:40:14:40:29 | path.extension() [Some, &ref] | provenance | MaD:35 |
9193
| test.rs:40:14:40:29 | path.extension() [Some, &ref] | test.rs:40:14:40:38 | ... .unwrap() | provenance | MaD:27 |
92-
| test.rs:41:14:41:17 | path | test.rs:41:14:41:32 | path.canonicalize() [Ok] | provenance | MaD:34 |
94+
| test.rs:41:14:41:17 | path | test.rs:41:14:41:32 | path.canonicalize() [Ok] | provenance | MaD:35 |
9395
| test.rs:41:14:41:32 | path.canonicalize() [Ok] | test.rs:41:14:41:41 | ... .unwrap() | provenance | MaD:28 |
9496
| test.rs:44:13:44:21 | file_name | test.rs:45:14:45:22 | file_name | provenance | |
9597
| test.rs:44:13:44:21 | file_name | test.rs:46:14:46:22 | file_name | provenance | |
@@ -226,43 +228,43 @@ edges
226228
| test.rs:197:20:197:52 | ...::open(...) [future, Ok] | test.rs:197:20:197:58 | await ... [Ok] | provenance | |
227229
| test.rs:197:20:197:58 | await ... [Ok] | test.rs:197:20:197:59 | TryExpr | provenance | |
228230
| test.rs:197:20:197:59 | TryExpr | test.rs:197:9:197:16 | mut file | provenance | |
229-
| test.rs:201:22:201:25 | file | test.rs:201:32:201:42 | [post] &mut buffer [&ref] | provenance | MaD:38 |
231+
| test.rs:201:22:201:25 | file | test.rs:201:32:201:42 | [post] &mut buffer [&ref] | provenance | MaD:39 |
230232
| test.rs:201:32:201:42 | [post] &mut buffer [&ref] | test.rs:201:37:201:42 | [post] buffer | provenance | |
231233
| test.rs:201:37:201:42 | [post] buffer | test.rs:202:15:202:20 | buffer | provenance | |
232234
| test.rs:202:15:202:20 | buffer | test.rs:202:14:202:20 | &buffer | provenance | |
233-
| test.rs:207:22:207:25 | file | test.rs:207:39:207:49 | [post] &mut buffer [&ref] | provenance | MaD:44 |
235+
| test.rs:207:22:207:25 | file | test.rs:207:39:207:49 | [post] &mut buffer [&ref] | provenance | MaD:45 |
234236
| test.rs:207:39:207:49 | [post] &mut buffer [&ref] | test.rs:207:44:207:49 | [post] buffer | provenance | |
235237
| test.rs:207:44:207:49 | [post] buffer | test.rs:208:15:208:20 | buffer | provenance | |
236238
| test.rs:208:15:208:20 | buffer | test.rs:208:14:208:20 | &buffer | provenance | |
237-
| test.rs:213:22:213:25 | file | test.rs:213:42:213:52 | [post] &mut buffer [&ref] | provenance | MaD:45 |
239+
| test.rs:213:22:213:25 | file | test.rs:213:42:213:52 | [post] &mut buffer [&ref] | provenance | MaD:46 |
238240
| test.rs:213:42:213:52 | [post] &mut buffer [&ref] | test.rs:213:47:213:52 | [post] buffer | provenance | |
239241
| test.rs:213:47:213:52 | [post] buffer | test.rs:214:15:214:20 | buffer | provenance | |
240242
| test.rs:214:15:214:20 | buffer | test.rs:214:14:214:20 | &buffer | provenance | |
241-
| test.rs:219:9:219:12 | file | test.rs:219:25:219:35 | [post] &mut buffer [&ref] | provenance | MaD:40 |
243+
| test.rs:219:9:219:12 | file | test.rs:219:25:219:35 | [post] &mut buffer [&ref] | provenance | MaD:41 |
242244
| test.rs:219:25:219:35 | [post] &mut buffer [&ref] | test.rs:219:30:219:35 | [post] buffer | provenance | |
243245
| test.rs:219:30:219:35 | [post] buffer | test.rs:220:15:220:20 | buffer | provenance | |
244246
| test.rs:220:15:220:20 | buffer | test.rs:220:14:220:20 | &buffer | provenance | |
245247
| test.rs:224:13:224:14 | v1 | test.rs:228:14:228:15 | v1 | provenance | |
246-
| test.rs:224:18:224:21 | file | test.rs:224:18:224:31 | file.read_u8() [future, Ok] | provenance | MaD:46 |
248+
| test.rs:224:18:224:21 | file | test.rs:224:18:224:31 | file.read_u8() [future, Ok] | provenance | MaD:47 |
247249
| test.rs:224:18:224:31 | file.read_u8() [future, Ok] | test.rs:224:18:224:37 | await ... [Ok] | provenance | |
248250
| test.rs:224:18:224:37 | await ... [Ok] | test.rs:224:18:224:38 | TryExpr | provenance | |
249251
| test.rs:224:18:224:38 | TryExpr | test.rs:224:13:224:14 | v1 | provenance | |
250252
| test.rs:225:13:225:14 | v2 | test.rs:229:14:229:15 | v2 | provenance | |
251-
| test.rs:225:18:225:21 | file | test.rs:225:18:225:32 | file.read_i16() [future, Ok] | provenance | MaD:42 |
253+
| test.rs:225:18:225:21 | file | test.rs:225:18:225:32 | file.read_i16() [future, Ok] | provenance | MaD:43 |
252254
| test.rs:225:18:225:32 | file.read_i16() [future, Ok] | test.rs:225:18:225:38 | await ... [Ok] | provenance | |
253255
| test.rs:225:18:225:38 | await ... [Ok] | test.rs:225:18:225:39 | TryExpr | provenance | |
254256
| test.rs:225:18:225:39 | TryExpr | test.rs:225:13:225:14 | v2 | provenance | |
255257
| test.rs:226:13:226:14 | v3 | test.rs:230:14:230:15 | v3 | provenance | |
256-
| test.rs:226:18:226:21 | file | test.rs:226:18:226:32 | file.read_f32() [future, Ok] | provenance | MaD:41 |
258+
| test.rs:226:18:226:21 | file | test.rs:226:18:226:32 | file.read_f32() [future, Ok] | provenance | MaD:42 |
257259
| test.rs:226:18:226:32 | file.read_f32() [future, Ok] | test.rs:226:18:226:38 | await ... [Ok] | provenance | |
258260
| test.rs:226:18:226:38 | await ... [Ok] | test.rs:226:18:226:39 | TryExpr | provenance | |
259261
| test.rs:226:18:226:39 | TryExpr | test.rs:226:13:226:14 | v3 | provenance | |
260262
| test.rs:227:13:227:14 | v4 | test.rs:231:14:231:15 | v4 | provenance | |
261-
| test.rs:227:18:227:21 | file | test.rs:227:18:227:35 | file.read_i64_le() [future, Ok] | provenance | MaD:43 |
263+
| test.rs:227:18:227:21 | file | test.rs:227:18:227:35 | file.read_i64_le() [future, Ok] | provenance | MaD:44 |
262264
| test.rs:227:18:227:35 | file.read_i64_le() [future, Ok] | test.rs:227:18:227:41 | await ... [Ok] | provenance | |
263265
| test.rs:227:18:227:41 | await ... [Ok] | test.rs:227:18:227:42 | TryExpr | provenance | |
264266
| test.rs:227:18:227:42 | TryExpr | test.rs:227:13:227:14 | v4 | provenance | |
265-
| test.rs:236:9:236:12 | file | test.rs:236:23:236:33 | [post] &mut buffer [&ref] | provenance | MaD:39 |
267+
| test.rs:236:9:236:12 | file | test.rs:236:23:236:33 | [post] &mut buffer [&ref] | provenance | MaD:40 |
266268
| test.rs:236:23:236:33 | [post] &mut buffer [&ref] | test.rs:236:28:236:33 | [post] buffer | provenance | |
267269
| test.rs:236:28:236:33 | [post] buffer | test.rs:237:15:237:20 | buffer | provenance | |
268270
| test.rs:237:15:237:20 | buffer | test.rs:237:14:237:20 | &buffer | provenance | |
@@ -271,7 +273,7 @@ edges
271273
| test.rs:243:22:243:65 | ... .open(...) [future, Ok] | test.rs:243:22:243:71 | await ... [Ok] | provenance | |
272274
| test.rs:243:22:243:71 | await ... [Ok] | test.rs:243:22:243:72 | TryExpr | provenance | |
273275
| test.rs:243:22:243:72 | TryExpr | test.rs:243:13:243:18 | mut f1 | provenance | |
274-
| test.rs:245:22:245:23 | f1 | test.rs:245:30:245:40 | [post] &mut buffer [&ref] | provenance | MaD:38 |
276+
| test.rs:245:22:245:23 | f1 | test.rs:245:30:245:40 | [post] &mut buffer [&ref] | provenance | MaD:39 |
275277
| test.rs:245:30:245:40 | [post] &mut buffer [&ref] | test.rs:245:35:245:40 | [post] buffer | provenance | |
276278
| test.rs:245:35:245:40 | [post] buffer | test.rs:246:15:246:20 | buffer | provenance | |
277279
| test.rs:246:15:246:20 | buffer | test.rs:246:14:246:20 | &buffer | provenance | |

0 commit comments

Comments
 (0)