Skip to content

Commit 468e4c3

Browse files
committed
Add a test for struct case
1 parent a2e5e5c commit 468e4c3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//@ check-pass
2+
3+
// Make sure we don't have any false positives here.
4+
5+
#![deny(dead_code)]
6+
7+
struct Foo {
8+
bar: usize,
9+
}
10+
11+
fn get_thing<T>() -> T {
12+
todo!()
13+
}
14+
15+
pub fn main() {
16+
let Foo { bar: _x } = get_thing();
17+
}

0 commit comments

Comments
 (0)