summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-block-non-item-statement-rpass.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/consts/const-block-non-item-statement-rpass.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-block-non-item-statement-rpass.rs b/src/test/ui/consts/const-block-non-item-statement-rpass.rs
new file mode 100644
index 000000000..3e52eb50e
--- /dev/null
+++ b/src/test/ui/consts/const-block-non-item-statement-rpass.rs
@@ -0,0 +1,11 @@
+// run-pass
+#![allow(dead_code, unused)]
+
+#[repr(u8)]
+enum Foo {
+ Bar = { let x = 1; 3 }
+}
+
+pub fn main() {
+ assert_eq!(3, Foo::Bar as u8);
+}