mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
15 lines
227 B
Rust
15 lines
227 B
Rust
![]() |
// run-pass
|
||
|
|
||
|
#![feature(macro_metavar_expr)]
|
||
|
|
||
|
macro_rules! ignore {
|
||
|
( $( $i:ident ),* ) => {{
|
||
|
let array: [i32; 0] = [$( ${ignore(i)} )*];
|
||
|
array
|
||
|
}};
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
assert_eq!(ignore!(a, b, c), []);
|
||
|
}
|