We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
vec!
1 parent 11f6096 commit 3ae2d21Copy full SHA for 3ae2d21
src/liballoc/macros.rs
@@ -42,10 +42,9 @@ macro_rules! vec {
42
($elem:expr; $n:expr) => (
43
$crate::vec::from_elem($elem, $n)
44
);
45
- ($($x:expr),*) => (
+ ($($x:expr),* $(,)?) => (
46
<[_]>::into_vec(box [$($x),*])
47
48
- ($($x:expr,)*) => ($crate::vec![$($x),*])
49
}
50
51
// HACK(japaric): with cfg(test) the inherent `[T]::into_vec` method, which is
0 commit comments