]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/dead-code/issue-68408-false-positive.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / lint / dead-code / issue-68408-false-positive.rs
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 }