Closed as not planned
Description
struct S { f: u32 }
fn main() {
{ S { f: 42 } }.f; // rustc accepts, parser-lalr rejects
{ 42 } as i32; // rustc and parser-lalr reject
{ 42 } == 42; // rustc and parser-lalr reject
}
The grammar in src/grammar/parser-lalr.y should probably be relaxed to accept the first example.
AFAIK, Rust could allow the other two cases (and others), because there are no statements or expressions that begin with as
or ==
.