Closed
Description
(Updated with concrete example:)
struct Foo {
A: int,
B: int
}
fn main() {
let B = 3i;
let x = Foo{A:1,B};
}
yields (live playpen: http://is.gd/GDjwLK)
<anon>:8:22: 8:23 error: expected `:` but found `}`
<anon>:8 let x = Foo{A:1,B};
^
This feels like something we should be able to better report (possibly as a note suggestion).
Original bug report follows:
/run/media/jdm/ssd/servo/src/servo/dom/bindings/ClientRectBinding.rs:254:61: 254:62 error: expected `;` but found `{`
/run/media/jdm/ssd/servo/src/servo/dom/bindings/ClientRectBinding.rs:254 const NativeHooks: NativePropertyHooks =
NativePropertyHooks { 0 as *u8, ResolveProperty, 0 as *u8, EnumerateProperties, 0 as *NativePropertyHooks };
This feels like something we should be able to better report (possibly as a note suggestion).