]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-19100.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-19100.rs
CommitLineData
7cac9316 1// run-pass
8faf50e0 2// run-rustfix
7cac9316 3
9e0c209e
SL
4#![allow(non_snake_case)]
5#![allow(dead_code)]
6#![allow(unused_variables)]
7
c34b1796 8#[derive(Copy, Clone)]
1a4d82fc
JJ
9enum Foo {
10 Bar,
11 Baz
12}
13
1a4d82fc
JJ
14impl Foo {
15 fn foo(&self) {
16 match self {
17 &
18Bar if true
19//~^ WARN pattern binding `Bar` is named the same as one of the variants of the type `Foo`
1a4d82fc
JJ
20=> println!("bar"),
21 &
22Baz if false
23//~^ WARN pattern binding `Baz` is named the same as one of the variants of the type `Foo`
1a4d82fc
JJ
24=> println!("baz"),
25_ => ()
26 }
27 }
28}
29
30fn main() {}