Skip to content

Commit 7bf795b

Browse files
authored
Rollup merge of #96896 - JohnTitor:issue-68408, r=compiler-errors
Add regression test for #68408 Closes #68408
2 parents ed9faee + c7d5e40 commit 7bf795b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// check-pass
2+
3+
// Make sure we don't have any false positives here.
4+
5+
#![deny(dead_code)]
6+
7+
enum X {
8+
A { _a: () },
9+
B { _b: () },
10+
}
11+
impl X {
12+
fn a() -> X {
13+
X::A { _a: () }
14+
}
15+
fn b() -> Self {
16+
Self::B { _b: () }
17+
}
18+
}
19+
20+
fn main() {
21+
let (_, _) = (X::a(), X::b());
22+
}

0 commit comments

Comments
 (0)