1 #[allow(dead_code)] 2 3 /// Test for https://github.com/rust-lang/rust-clippy/issues/478 4 5 enum Baz { 6 One, 7 Two, 8 } 9 10 struct Test { 11 t: Option<usize>, 12 b: Baz, 13 } 14 main()15fn main() {} 16 foo()17pub fn foo() { 18 use Baz::*; 19 let x = Test { t: Some(0), b: One }; 20 21 match x { 22 Test { t: Some(_), b: One } => unreachable!(), 23 Test { t: Some(42), b: Two } => unreachable!(), 24 Test { t: None, .. } => unreachable!(), 25 Test { .. } => unreachable!(), 26 } 27 } 28