diff options
Diffstat (limited to 'tests/ui/consts/const-enum-ptr.rs')
| -rw-r--r-- | tests/ui/consts/const-enum-ptr.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/consts/const-enum-ptr.rs b/tests/ui/consts/const-enum-ptr.rs new file mode 100644 index 00000000000..84f4eb8406d --- /dev/null +++ b/tests/ui/consts/const-enum-ptr.rs @@ -0,0 +1,12 @@ +// run-pass +#![allow(dead_code)] + +enum E { V0, V1(isize) } +static C: &'static E = &E::V0; + +pub fn main() { + match *C { + E::V0 => (), + _ => panic!() + } +} |
