Skip to content

Commit 5e5b630

Browse files
committed
Rust: Add tests with where clause
1 parent 3bc1d47 commit 5e5b630

File tree

6 files changed

+3808
-3736
lines changed

6 files changed

+3808
-3736
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ multipleCallTargets
22
| main.rs:118:9:118:11 | f(...) |
33
| proc_macro.rs:9:5:11:5 | ...::new(...) |
44
multiplePathResolutions
5-
| main.rs:626:3:626:12 | proc_macro |
6-
| main.rs:632:7:632:16 | proc_macro |
7-
| main.rs:635:7:635:16 | proc_macro |
5+
| main.rs:641:3:641:12 | proc_macro |
6+
| main.rs:647:7:647:16 | proc_macro |
7+
| main.rs:650:7:650:16 | proc_macro |

rust/ql/test/library-tests/path-resolution/main.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,21 @@ mod m15 {
312312
}
313313
} // I82
314314

315+
#[rustfmt::skip]
316+
trait Trait3<
317+
TT // ITT
318+
>
319+
where
320+
Self: Trait1, // $ item=ITrait3 item=I79
321+
TT: Trait1, // $ item=ITT item=I79
322+
{
323+
fn f(&self, tt: TT) { // $ item=ITT
324+
Self::g(self); // $ MISSING: item=I80
325+
TT::g(&tt); // $ item=I80
326+
self.g(); // $ MISSING: item=I80
327+
}
328+
} // ITrait3
329+
315330
struct S; // I81
316331

317332
#[rustfmt::skip]

0 commit comments

Comments
 (0)