Skip to content

Commit

Permalink
Add inline const macro test
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Oct 19, 2020
1 parent d641cb8 commit dcd2d91
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/ui/inline-const/const-expr-macro.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// run-pass

#![allow(incomplete_features)]
#![feature(inline_const)]
macro_rules! do_const_block{
($val:block) => { const $val }
}

fn main() {
let s = do_const_block!({ 22 });
assert_eq!(s, 22);
}

0 comments on commit dcd2d91

Please sign in to comment.