fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// run-rustfix 2 3#![allow(non_snake_case)] 4#![allow(dead_code)] 5#![allow(unused_variables)] 6 7#[derive(Copy, Clone)] 8enum Foo { 9 Bar, 10 Baz 11} 12 13impl Foo { 14 fn foo(&self) { 15 match self { 16 & 17Foo::Bar if true 18//~^ ERROR pattern binding `Bar` is named the same as one of the variants of the type `Foo` 19=> println!("bar"), 20 & 21Foo::Baz if false 22//~^ ERROR pattern binding `Baz` is named the same as one of the variants of the type `Foo` 23=> println!("baz"), 24_ => () 25 } 26 } 27} 28 29fn main() {}