{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/33078","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/33078/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/33078/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/33078/events","html_url":"https://github.com/rust-lang/rust/issues/33078","id":149210681,"number":33078,"title":"Generic parameters VS less then comparison parsing ambiguity","user":{"login":"matklad","id":1711539,"avatar_url":"https://avatars.githubusercontent.com/u/1711539?v=3","gravatar_id":"","url":"https://api.github.com/users/matklad","html_url":"https://github.com/matklad","followers_url":"https://api.github.com/users/matklad/followers","following_url":"https://api.github.com/users/matklad/following{/other_user}","gists_url":"https://api.github.com/users/matklad/gists{/gist_id}","starred_url":"https://api.github.com/users/matklad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matklad/subscriptions","organizations_url":"https://api.github.com/users/matklad/orgs","repos_url":"https://api.github.com/users/matklad/repos","events_url":"https://api.github.com/users/matklad/events{/privacy}","received_events_url":"https://api.github.com/users/matklad/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-18T17:00:10Z","updated_at":"2016-04-18T20:20:50Z","closed_at":"2016-04-18T20:20:50Z","body":"The following\r\n\r\n```\r\nfn main() {\r\n    let _ = 1 as i32 < 1;\r\n}\r\n```\r\n\r\nproduces 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:\r\n\r\n```\r\nuser@UNIT-326 [07:47:36 PM] [~/projects/rust/src/test] [master *]\r\n-> % grep \"as \\\\w* <\" -R .              \r\n./run-pass/type-macros-hlist.rs:                  < Expr ! ( HList ! [ $ ( $ LHS ) * ] ) as Add < Expr ! (\r\n./run-pass/type-macros-hlist.rs:                  < Expr ! ( $ LHS ) as Add < Expr ! ( $ ( $ RHS ) + ) >> ::\r\n```\r\n\r\n`1 as i32 <= 1` and `1 as i32 > 1` are parsed successfully. `1 as i32 << 1` also fails.\r\n`"}}