Skip to content

Commit b40118d

Browse files
committed
Rust: Add another type inference test
1 parent e172e74 commit b40118d

File tree

2 files changed

+229
-210
lines changed

2 files changed

+229
-210
lines changed

rust/ql/test/library-tests/type-inference/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2444,6 +2444,7 @@ mod explicit_type_args {
24442444
}
24452445

24462446
mod tuples {
2447+
#[derive(Debug, Clone, Copy)]
24472448
struct S1 {}
24482449

24492450
impl S1 {
@@ -2484,6 +2485,9 @@ mod tuples {
24842485
_ => print!("expected"),
24852486
}
24862487
let x = pair.0; // $ type=x:i32
2488+
2489+
let y = &S1::get_pair(); // $ target=get_pair
2490+
y.0.foo(); // $ MISSING: target=foo
24872491
}
24882492
}
24892493

0 commit comments

Comments
 (0)