1
Fork 0

Add regression test for #68408

This commit is contained in:
Yuki Okushi 2022-05-10 20:52:01 +09:00
parent 2226f19f70
commit c7d5e40f7e
No known key found for this signature in database
GPG key ID: 379CEEFDD63E5DD7

View file

@ -0,0 +1,22 @@
// check-pass
// Make sure we don't have any false positives here.
#![deny(dead_code)]
enum X {
A { _a: () },
B { _b: () },
}
impl X {
fn a() -> X {
X::A { _a: () }
}
fn b() -> Self {
Self::B { _b: () }
}
}
fn main() {
let (_, _) = (X::a(), X::b());
}