rust/tests/ui/array-slice-vec/vec-macro-with-brackets.rs

17 lines
275 B
Rust
Raw Normal View History

// run-pass
#![allow(unused_variables)]
// pretty-expanded FIXME #23616
macro_rules! vec [
($($e:expr),*) => ({
let mut _temp = ::std::vec::Vec::new();
$(_temp.push($e);)*
_temp
})
];
pub fn main() {
2015-01-25 15:05:03 -06:00
let my_vec = vec![1, 2, 3, 4, 5];
}