{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/28361","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/28361/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/28361/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/28361/events","html_url":"https://github.com/rust-lang/rust/issues/28361","id":106086830,"number":28361,"title":"Calling a block: discrepancy between parser-lalr and rustc","user":{"login":"rprichard","id":1572855,"avatar_url":"https://avatars.githubusercontent.com/u/1572855?v=3","gravatar_id":"","url":"https://api.github.com/users/rprichard","html_url":"https://github.com/rprichard","followers_url":"https://api.github.com/users/rprichard/followers","following_url":"https://api.github.com/users/rprichard/following{/other_user}","gists_url":"https://api.github.com/users/rprichard/gists{/gist_id}","starred_url":"https://api.github.com/users/rprichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rprichard/subscriptions","organizations_url":"https://api.github.com/users/rprichard/orgs","repos_url":"https://api.github.com/users/rprichard/repos","events_url":"https://api.github.com/users/rprichard/events{/privacy}","received_events_url":"https://api.github.com/users/rprichard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-11T20:20:04Z","updated_at":"2015-09-11T20:36:18Z","closed_at":null,"body":"I don't know whether this code is valid syntax:\r\n```rust\r\nfn f(i: i32) -> i32 { i }\r\nfn main() {\r\n    1 + {f}(1);\r\n}\r\n```\r\nIt is rejected by `rustc`:\r\n```\r\ntest.rs:3:12: 3:13 error: expected one of `.`, `;`, `}`, or an operator, found `(`\r\ntest.rs:3     1 + {f}(1);\r\n                     ^\r\n```\r\nIt is *accepted* by the LALR parser in src/grammar.  (Build the `check-grammar` target, then run `grammar/parser-lalr -v`.)\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/139655959","html_url":"https://github.com/rust-lang/rust/issues/28361#issuecomment-139655959","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/28361","id":139655959,"user":{"login":"rprichard","id":1572855,"avatar_url":"https://avatars.githubusercontent.com/u/1572855?v=3","gravatar_id":"","url":"https://api.github.com/users/rprichard","html_url":"https://github.com/rprichard","followers_url":"https://api.github.com/users/rprichard/followers","following_url":"https://api.github.com/users/rprichard/following{/other_user}","gists_url":"https://api.github.com/users/rprichard/gists{/gist_id}","starred_url":"https://api.github.com/users/rprichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rprichard/subscriptions","organizations_url":"https://api.github.com/users/rprichard/orgs","repos_url":"https://api.github.com/users/rprichard/repos","events_url":"https://api.github.com/users/rprichard/events{/privacy}","received_events_url":"https://api.github.com/users/rprichard/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T20:36:18Z","updated_at":"2015-09-11T20:36:18Z","body":"#27478 is a similar issue.\r\n\r\n`rustc` and `parser-lalr` both accept these variants:\r\n```rust\r\n(1 + {f}(1));\r\nlet _ = 1 + {f}(1);\r\n```"}}