Skip to content

Commit

Permalink
Rollup merge of #96896 - JohnTitor:issue-68408, r=compiler-errors
Browse files Browse the repository at this point in the history
Add regression test for #68408

Closes #68408
  • Loading branch information
JohnTitor authored May 11, 2022
2 parents ed9faee + c7d5e40 commit 7bf795b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/ui/lint/dead-code/issue-68408-false-positive.rs
Original file line number Diff line number Diff line change
@@ -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());
}

0 comments on commit 7bf795b

Please sign in to comment.