Closed
Description
The following
fn main() {
let _ = 1 as i32 < 1;
}
produces a parse error, because the parser expects type parameters after i32
, like in 1 as i32<T>
. Is this intentional? Looks like there are no tests for this behavior:
user@UNIT-326 [07:47:36 PM] [~/projects/rust/src/test] [master *]
-> % grep "as \\w* <" -R .
./run-pass/type-macros-hlist.rs: < Expr ! ( HList ! [ $ ( $ LHS ) * ] ) as Add < Expr ! (
./run-pass/type-macros-hlist.rs: < Expr ! ( $ LHS ) as Add < Expr ! ( $ ( $ RHS ) + ) >> ::
1 as i32 <= 1
and 1 as i32 > 1
are parsed successfully. 1 as i32 << 1
also fails.
`
Metadata
Metadata
Assignees
Labels
No labels