Skip to content

Commit 5fe9507

Browse files
committed
Rust: Add tests with where clause
1 parent 6c00cea commit 5fe9507

File tree

4 files changed

+3821
-3749
lines changed

4 files changed

+3821
-3749
lines changed

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)