Closed
Description
trait Foo { fn foo(&self); }
macro_rules! foo {
() => ();
($a:expr, $($n:expr,)*) => (
impl Foo for [(); $a] {
fn foo(&self) {
// Okay
let baz: [i32; $a] = [$($n),*];
// ICE
let bar = [$($n),*];
}
}
foo!($($n,)*);
)
}
foo!(3, 2, 1, 0,);
fn main() {}
<anon>:11:27: 11:36 error: internal compiler error: cat_expr Errd
<anon>:11 let bar = [$($n),*];
^~~~~~~~~
rustc 1.0.0-nightly (91bdf23f5 2015-03-09) (built 2015-03-09)
Metadata
Metadata
Assignees
Labels
No labels