diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/consts/const-enum-ptr.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-enum-ptr.rs b/src/test/ui/consts/const-enum-ptr.rs new file mode 100644 index 000000000..84f4eb840 --- /dev/null +++ b/src/test/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!() + } +} |