mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 09:13:07 +03:00
Add inline const macro test
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user