diff options
Diffstat (limited to 'tests/ui/error-codes/E0164.rs')
-rw-r--r-- | tests/ui/error-codes/E0164.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0164.rs b/tests/ui/error-codes/E0164.rs new file mode 100644 index 000000000..2d412f754 --- /dev/null +++ b/tests/ui/error-codes/E0164.rs @@ -0,0 +1,14 @@ +enum Foo {} + +impl Foo { + const B: u8 = 0; +} + +fn bar(foo: Foo) -> u32 { + match foo { + Foo::B(i) => i, //~ ERROR E0164 + } +} + +fn main() { +} |