{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/48501","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/48501/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/48501/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/48501/events","html_url":"https://github.com/rust-lang/rust/issues/48501","id":299938610,"number":48501,"title":"Operators in patterns have incorrect priorities","user":{"login":"petrochenkov","id":5751617,"avatar_url":"https://avatars2.githubusercontent.com/u/5751617?v=4","gravatar_id":"","url":"https://api.github.com/users/petrochenkov","html_url":"https://github.com/petrochenkov","followers_url":"https://api.github.com/users/petrochenkov/followers","following_url":"https://api.github.com/users/petrochenkov/following{/other_user}","gists_url":"https://api.github.com/users/petrochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/petrochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrochenkov/subscriptions","organizations_url":"https://api.github.com/users/petrochenkov/orgs","repos_url":"https://api.github.com/users/petrochenkov/repos","events_url":"https://api.github.com/users/petrochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/petrochenkov/received_events","type":"User","site_admin":false},"labels":[{"id":235777,"url":"https://api.github.com/repos/rust-lang/rust/labels/A-grammar","name":"A-grammar","color":"d7e102","default":false},{"id":27424086,"url":"https://api.github.com/repos/rust-lang/rust/labels/A-parser","name":"A-parser","color":"d7e102","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-24T12:47:07Z","updated_at":"2018-02-25T02:44:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"(Or at least unnatural priorities.)\r\n\r\nBinary range operators have higher priority than unary operators like `&` or `box`.\r\n\r\n```rust\r\n#![feature(exclusive_range_pattern)]\r\n\r\nfn main() {\r\n    // Interpreted as (&0) .. (10), ERROR mismatched types\r\n    let x = &0 .. 10;\r\n\r\n    match &0 {\r\n        &0 .. 10 => {} // OK?!\r\n        _ => {}\r\n    }\r\n}\r\n```\r\n\r\nWe can change the priorities for all the unstable kinds of ranges and come up with some deprecation story for stable `BEGIN ... END`."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/368278285","html_url":"https://github.com/rust-lang/rust/issues/48501#issuecomment-368278285","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/48501","id":368278285,"user":{"login":"durka","id":47007,"avatar_url":"https://avatars3.githubusercontent.com/u/47007?v=4","gravatar_id":"","url":"https://api.github.com/users/durka","html_url":"https://github.com/durka","followers_url":"https://api.github.com/users/durka/followers","following_url":"https://api.github.com/users/durka/following{/other_user}","gists_url":"https://api.github.com/users/durka/gists{/gist_id}","starred_url":"https://api.github.com/users/durka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/durka/subscriptions","organizations_url":"https://api.github.com/users/durka/orgs","repos_url":"https://api.github.com/users/durka/repos","events_url":"https://api.github.com/users/durka/events{/privacy}","received_events_url":"https://api.github.com/users/durka/received_events","type":"User","site_admin":false},"created_at":"2018-02-25T02:44:47Z","updated_at":"2018-02-25T02:44:47Z","author_association":"CONTRIBUTOR","body":"This is weird. The behavior in expressions is the one I would expect. However, in patterns you aren't allowed to use parentheses for grouping (why not?) so there's no way to override the precedence."}}
{"actor":{"display_login":"durka"}}