1 enum Example { Ex(String), NotEx }
19 let x = Option(1); //~ ERROR expected function, tuple struct or tuple variant, found enum
21 if let Option(_) = x { //~ ERROR expected tuple struct or tuple variant, found enum
22 println!("It is OK.");
25 let y = Example::Ex(String::from("test"));
27 if let Example(_) = y { //~ ERROR expected tuple struct or tuple variant, found enum
28 println!("It is OK.");
31 let y = Void(); //~ ERROR expected function, tuple struct or tuple variant, found enum
33 let z = ManyVariants(); //~ ERROR expected function, tuple struct or tuple variant, found enum