summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inline-const/const-expr-macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/inline-const/const-expr-macro.rs')
-rw-r--r--src/test/ui/inline-const/const-expr-macro.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/inline-const/const-expr-macro.rs b/src/test/ui/inline-const/const-expr-macro.rs
new file mode 100644
index 000000000..041f3e15a
--- /dev/null
+++ b/src/test/ui/inline-const/const-expr-macro.rs
@@ -0,0 +1,12 @@
+// run-pass
+
+#![feature(inline_const)]
+
+macro_rules! do_const_block{
+ ($val:block) => { const $val }
+}
+
+fn main() {
+ let s = do_const_block!({ 22 });
+ assert_eq!(s, 22);
+}