Skip to content

Commit c7d20eb

Browse files
committed
Rust: Update expected test output
1 parent ebde0bd commit c7d20eb

File tree

15 files changed

+56
-95
lines changed

15 files changed

+56
-95
lines changed
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
multipleCallTargets
2-
| proc_macro.rs:6:18:6:61 | ...::from(...) |
3-
| proc_macro.rs:7:15:7:58 | ...::from(...) |
42
| proc_macro.rs:15:5:17:5 | ...::new(...) |
5-
| proc_macro.rs:16:12:16:16 | ...::to_tokens(...) |
6-
| proc_macro.rs:22:15:22:58 | ...::from(...) |
73
| proc_macro.rs:25:5:28:5 | ...::new(...) |
8-
| proc_macro.rs:26:10:26:12 | ...::to_tokens(...) |
9-
| proc_macro.rs:27:10:27:16 | ...::to_tokens(...) |
10-
| proc_macro.rs:38:15:38:64 | ...::from(...) |
114
| proc_macro.rs:41:5:49:5 | ...::new(...) |
125
| proc_macro.rs:41:5:49:5 | ...::new(...) |
136
| proc_macro.rs:41:5:49:5 | ...::new(...) |
147
| proc_macro.rs:41:5:49:5 | ...::new(...) |
15-
| proc_macro.rs:42:16:42:26 | ...::to_tokens(...) |
168
| proc_macro.rs:44:27:44:30 | ...::to_tokens(...) |
17-
| proc_macro.rs:46:18:46:28 | ...::to_tokens(...) |
189
multiplePathResolutions
1910
| macro_expansion.rs:1:5:1:14 | proc_macro |

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ edges
117117
| main.rs:228:11:228:14 | [post] self [&ref, MyInt] | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | provenance | |
118118
| main.rs:228:25:228:27 | rhs [MyInt] | main.rs:228:25:228:33 | rhs.value | provenance | |
119119
| main.rs:228:25:228:33 | rhs.value | main.rs:228:10:228:14 | [post] * ... [MyInt] | provenance | |
120+
| main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:236:12:236:15 | self [&ref, MyInt] | provenance | |
121+
| main.rs:236:9:236:22 | &... [&ref] | main.rs:235:38:237:5 | { ... } [&ref] | provenance | |
122+
| main.rs:236:10:236:22 | ... .value | main.rs:236:9:236:22 | &... [&ref] | provenance | |
123+
| main.rs:236:11:236:15 | * ... [MyInt] | main.rs:236:10:236:22 | ... .value | provenance | |
124+
| main.rs:236:12:236:15 | self [&ref, MyInt] | main.rs:236:11:236:15 | * ... [MyInt] | provenance | |
120125
| main.rs:242:9:242:9 | a [MyInt] | main.rs:244:13:244:13 | a [MyInt] | provenance | |
121126
| main.rs:242:13:242:38 | MyInt {...} [MyInt] | main.rs:242:9:242:9 | a [MyInt] | provenance | |
122127
| main.rs:242:28:242:36 | source(...) | main.rs:242:13:242:38 | MyInt {...} [MyInt] | provenance | |
@@ -140,6 +145,15 @@ edges
140145
| main.rs:261:35:261:35 | b [MyInt] | main.rs:227:30:227:39 | ...: MyInt [MyInt] | provenance | |
141146
| main.rs:261:35:261:35 | b [MyInt] | main.rs:261:27:261:32 | [post] &mut a [&ref, MyInt] | provenance | |
142147
| main.rs:262:10:262:10 | a [MyInt] | main.rs:262:10:262:16 | a.value | provenance | |
148+
| main.rs:270:9:270:9 | a [MyInt] | main.rs:272:28:272:28 | a [MyInt] | provenance | |
149+
| main.rs:270:13:270:39 | MyInt {...} [MyInt] | main.rs:270:9:270:9 | a [MyInt] | provenance | |
150+
| main.rs:270:28:270:37 | source(...) | main.rs:270:13:270:39 | MyInt {...} [MyInt] | provenance | |
151+
| main.rs:272:9:272:9 | c | main.rs:273:10:273:10 | c | provenance | |
152+
| main.rs:272:13:272:29 | * ... | main.rs:272:9:272:9 | c | provenance | |
153+
| main.rs:272:14:272:29 | ...::deref(...) [&ref] | main.rs:272:13:272:29 | * ... | provenance | |
154+
| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | provenance | |
155+
| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:272:14:272:29 | ...::deref(...) [&ref] | provenance | |
156+
| main.rs:272:28:272:28 | a [MyInt] | main.rs:272:27:272:28 | &a [&ref, MyInt] | provenance | |
143157
| main.rs:289:18:289:21 | SelfParam [MyInt] | main.rs:289:48:291:5 | { ... } [MyInt] | provenance | |
144158
| main.rs:293:26:293:37 | ...: MyInt [MyInt] | main.rs:293:49:295:5 | { ... } [MyInt] | provenance | |
145159
| main.rs:299:9:299:9 | a [MyInt] | main.rs:301:50:301:50 | a [MyInt] | provenance | |
@@ -297,6 +311,12 @@ nodes
297311
| main.rs:228:11:228:14 | [post] self [&ref, MyInt] | semmle.label | [post] self [&ref, MyInt] |
298312
| main.rs:228:25:228:27 | rhs [MyInt] | semmle.label | rhs [MyInt] |
299313
| main.rs:228:25:228:33 | rhs.value | semmle.label | rhs.value |
314+
| main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | semmle.label | SelfParam [&ref, MyInt] |
315+
| main.rs:235:38:237:5 | { ... } [&ref] | semmle.label | { ... } [&ref] |
316+
| main.rs:236:9:236:22 | &... [&ref] | semmle.label | &... [&ref] |
317+
| main.rs:236:10:236:22 | ... .value | semmle.label | ... .value |
318+
| main.rs:236:11:236:15 | * ... [MyInt] | semmle.label | * ... [MyInt] |
319+
| main.rs:236:12:236:15 | self [&ref, MyInt] | semmle.label | self [&ref, MyInt] |
300320
| main.rs:242:9:242:9 | a [MyInt] | semmle.label | a [MyInt] |
301321
| main.rs:242:13:242:38 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] |
302322
| main.rs:242:28:242:36 | source(...) | semmle.label | source(...) |
@@ -320,6 +340,15 @@ nodes
320340
| main.rs:261:35:261:35 | b [MyInt] | semmle.label | b [MyInt] |
321341
| main.rs:262:10:262:10 | a [MyInt] | semmle.label | a [MyInt] |
322342
| main.rs:262:10:262:16 | a.value | semmle.label | a.value |
343+
| main.rs:270:9:270:9 | a [MyInt] | semmle.label | a [MyInt] |
344+
| main.rs:270:13:270:39 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] |
345+
| main.rs:270:28:270:37 | source(...) | semmle.label | source(...) |
346+
| main.rs:272:9:272:9 | c | semmle.label | c |
347+
| main.rs:272:13:272:29 | * ... | semmle.label | * ... |
348+
| main.rs:272:14:272:29 | ...::deref(...) [&ref] | semmle.label | ...::deref(...) [&ref] |
349+
| main.rs:272:27:272:28 | &a [&ref, MyInt] | semmle.label | &a [&ref, MyInt] |
350+
| main.rs:272:28:272:28 | a [MyInt] | semmle.label | a [MyInt] |
351+
| main.rs:273:10:273:10 | c | semmle.label | c |
323352
| main.rs:289:18:289:21 | SelfParam [MyInt] | semmle.label | SelfParam [MyInt] |
324353
| main.rs:289:48:291:5 | { ... } [MyInt] | semmle.label | { ... } [MyInt] |
325354
| main.rs:293:26:293:37 | ...: MyInt [MyInt] | semmle.label | ...: MyInt [MyInt] |
@@ -367,6 +396,7 @@ subpaths
367396
| main.rs:244:13:244:13 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | main.rs:220:42:223:5 | { ... } [MyInt] | main.rs:244:13:244:17 | ... + ... [MyInt] |
368397
| main.rs:252:9:252:9 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | main.rs:220:42:223:5 | { ... } [MyInt] | main.rs:254:13:254:20 | a.add(...) [MyInt] |
369398
| main.rs:261:35:261:35 | b [MyInt] | main.rs:227:30:227:39 | ...: MyInt [MyInt] | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | main.rs:261:27:261:32 | [post] &mut a [&ref, MyInt] |
399+
| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:235:38:237:5 | { ... } [&ref] | main.rs:272:14:272:29 | ...::deref(...) [&ref] |
370400
| main.rs:301:50:301:50 | a [MyInt] | main.rs:289:18:289:21 | SelfParam [MyInt] | main.rs:289:48:291:5 | { ... } [MyInt] | main.rs:301:30:301:54 | ...::take_self(...) [MyInt] |
371401
| main.rs:306:55:306:55 | b [MyInt] | main.rs:293:26:293:37 | ...: MyInt [MyInt] | main.rs:293:49:295:5 | { ... } [MyInt] | main.rs:306:30:306:56 | ...::take_second(...) [MyInt] |
372402
testFailures
@@ -393,6 +423,7 @@ testFailures
393423
| main.rs:245:10:245:16 | c.value | main.rs:242:28:242:36 | source(...) | main.rs:245:10:245:16 | c.value | $@ | main.rs:242:28:242:36 | source(...) | source(...) |
394424
| main.rs:255:10:255:16 | d.value | main.rs:252:28:252:36 | source(...) | main.rs:255:10:255:16 | d.value | $@ | main.rs:252:28:252:36 | source(...) | source(...) |
395425
| main.rs:262:10:262:16 | a.value | main.rs:259:28:259:37 | source(...) | main.rs:262:10:262:16 | a.value | $@ | main.rs:259:28:259:37 | source(...) | source(...) |
426+
| main.rs:273:10:273:10 | c | main.rs:270:28:270:37 | source(...) | main.rs:273:10:273:10 | c | $@ | main.rs:270:28:270:37 | source(...) | source(...) |
396427
| main.rs:302:10:302:10 | c | main.rs:299:28:299:36 | source(...) | main.rs:302:10:302:10 | c | $@ | main.rs:299:28:299:36 | source(...) | source(...) |
397428
| main.rs:307:10:307:10 | c | main.rs:305:28:305:37 | source(...) | main.rs:307:10:307:10 | c | $@ | main.rs:305:28:305:37 | source(...) | source(...) |
398429
| main.rs:317:10:317:10 | a | main.rs:316:13:316:21 | source(...) | main.rs:317:10:317:10 | a | $@ | main.rs:316:13:316:21 | source(...) | source(...) |

rust/ql/test/library-tests/dataflow/global/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ fn test_operator_overloading() {
270270
let a = MyInt { value: source(27) };
271271
// The line below is what the prefix `*` desugars to.
272272
let c = *Deref::deref(&a);
273-
sink(c); // $ MISSING: hasValueFlow=27
273+
sink(c); // $ hasValueFlow=27
274274

275275
let a = MyInt { value: source(28) };
276276
let c = *a;

rust/ql/test/library-tests/dataflow/global/viableCallable.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
| main.rs:266:5:266:10 | ... *= ... | main.rs:227:5:229:5 | fn mul_assign |
7878
| main.rs:267:5:267:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
7979
| main.rs:270:28:270:37 | source(...) | main.rs:1:1:3:1 | fn source |
80+
| main.rs:272:14:272:29 | ...::deref(...) | main.rs:235:5:237:5 | fn deref |
8081
| main.rs:273:5:273:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
8182
| main.rs:275:28:275:37 | source(...) | main.rs:1:1:3:1 | fn source |
8283
| main.rs:276:13:276:14 | * ... | main.rs:235:5:237:5 | fn deref |

rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected

Lines changed: 0 additions & 3 deletions
This file was deleted.

rust/ql/test/library-tests/dataflow/local/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ fn conversions() {
529529

530530
sink(a as i64); // $ hasTaintFlow=50
531531
sink(a.into()); // $ MISSING: hasValueFlow=50
532-
sink(i64::from(a)); // $ hasTaintFlow=50
532+
sink(i64::from(a)); // $ MISSING: hasTaintFlow=50 -- we cannot resolve the `impl<T> From<T> for T` implementation
533533

534534
let b: i32 = source(51) as i32;
535535

rust/ql/test/library-tests/dataflow/sources/CONSISTENCY/PathResolutionConsistency.expected

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ multipleCallTargets
3232
| test.rs:737:30:737:43 | ...::_print(...) |
3333
| test.rs:752:14:752:43 | ...::_print(...) |
3434
| test.rs:766:14:766:34 | ...::_print(...) |
35-
| test.rs:777:23:777:80 | ...::try_from(...) |
3635
| test.rs:806:50:806:66 | ...::from(...) |
3736
| test.rs:806:50:806:66 | ...::from(...) |
3837
| test.rs:808:14:808:31 | ...::_print(...) |
@@ -74,14 +73,11 @@ multipleCallTargets
7473
| test.rs:883:14:883:29 | ...::_print(...) |
7574
| test.rs:885:27:885:36 | ...::_print(...) |
7675
| test.rs:886:28:886:41 | ...::_print(...) |
77-
| test_futures_io.rs:25:23:25:80 | ...::try_from(...) |
7876
| test_futures_io.rs:35:26:35:63 | pinned.poll_read(...) |
7977
| test_futures_io.rs:62:22:62:50 | pinned.poll_fill_buf(...) |
8078
| test_futures_io.rs:69:23:69:67 | ... .poll_fill_buf(...) |
8179
| test_futures_io.rs:93:26:93:63 | pinned.poll_read(...) |
8280
| test_futures_io.rs:116:22:116:50 | pinned.poll_fill_buf(...) |
8381
| test_futures_io.rs:145:26:145:49 | ...::with_capacity(...) |
84-
| web_frameworks.rs:40:5:40:26 | ...::write_str(...) |
85-
| web_frameworks.rs:40:5:40:26 | ...::write_str(...) |
8682
| web_frameworks.rs:101:14:101:23 | a.as_str() |
8783
| web_frameworks.rs:102:14:102:25 | a.as_bytes() |

rust/ql/test/library-tests/dataflow/sources/test_futures_io.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> {
4242
{
4343
// using the `AsyncReadExt::read` extension method (higher-level)
4444
let mut buffer1 = [0u8; 64];
45-
let bytes_read1 = futures::io::AsyncReadExt::read(&mut reader, &mut buffer1).await?;
46-
sink(&buffer1[..bytes_read1]); // $ hasTaintFlow=url
45+
let bytes_read1 = futures::io::AsyncReadExt::read(&mut reader, &mut buffer1).await?; // we cannot resolve the `read` call, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs`
46+
sink(&buffer1[..bytes_read1]); // $ MISSING: hasTaintFlow=url
4747

4848
let mut buffer2 = [0u8; 64];
4949
let bytes_read2 = reader.read(&mut buffer2).await?; // we cannot resolve the `read` call, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs`
@@ -100,8 +100,8 @@ async fn test_futures_rustls_futures_io() -> io::Result<()> {
100100
{
101101
// using the `AsyncReadExt::read` extension method (higher-level)
102102
let mut buffer1 = [0u8; 64];
103-
let bytes_read1 = futures::io::AsyncReadExt::read(&mut reader2, &mut buffer1).await?;
104-
sink(&buffer1[..bytes_read1]); // $ hasTaintFlow=url
103+
let bytes_read1 = futures::io::AsyncReadExt::read(&mut reader2, &mut buffer1).await?; // we cannot resolve the `read` call, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs`
104+
sink(&buffer1[..bytes_read1]); // $ MISSING: hasTaintFlow=url
105105

106106
let mut buffer2 = [0u8; 64];
107107
let bytes_read2 = reader2.read(&mut buffer2).await?; // we cannot resolve the `read` call, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs`

rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
multipleCallTargets
22
| main.rs:118:9:118:11 | f(...) |
3-
| proc_macro.rs:6:16:6:59 | ...::from(...) |
4-
| proc_macro.rs:7:19:7:62 | ...::from(...) |
53
| proc_macro.rs:9:5:11:5 | ...::new(...) |
6-
| proc_macro.rs:10:10:10:12 | ...::to_tokens(...) |
74
multiplePathResolutions
85
| main.rs:626:3:626:12 | proc_macro |
96
| main.rs:632:7:632:16 | proc_macro |
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
multipleCallTargets
22
| dereference.rs:61:15:61:24 | e1.deref() |
3-
| main.rs:2129:17:2129:35 | ...::my_from(...) |
4-
| main.rs:2130:17:2130:34 | ...::my_from(...) |
5-
| main.rs:2132:9:2132:34 | ...::my_from2(...) |
6-
| main.rs:2133:9:2133:33 | ...::my_from2(...) |
73
| main.rs:2186:13:2186:31 | ...::from(...) |
84
| main.rs:2187:13:2187:31 | ...::from(...) |
95
| main.rs:2188:13:2188:31 | ...::from(...) |
106
| main.rs:2194:13:2194:31 | ...::from(...) |
117
| main.rs:2195:13:2195:31 | ...::from(...) |
128
| main.rs:2196:13:2196:31 | ...::from(...) |
13-
| main.rs:2232:21:2232:43 | ...::from(...) |

0 commit comments

Comments
 (0)