{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1746","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1746/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1746/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1746/events","html_url":"https://github.com/rust-lang/rfcs/pull/1746","id":176201268,"number":1746,"title":"Check future-proofing of `macro_rules!` using FIRST sets.","user":{"login":"LeoTestard","id":907750,"avatar_url":"https://avatars.githubusercontent.com/u/907750?v=3","gravatar_id":"","url":"https://api.github.com/users/LeoTestard","html_url":"https://github.com/LeoTestard","followers_url":"https://api.github.com/users/LeoTestard/followers","following_url":"https://api.github.com/users/LeoTestard/following{/other_user}","gists_url":"https://api.github.com/users/LeoTestard/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoTestard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoTestard/subscriptions","organizations_url":"https://api.github.com/users/LeoTestard/orgs","repos_url":"https://api.github.com/users/LeoTestard/repos","events_url":"https://api.github.com/users/LeoTestard/events{/privacy}","received_events_url":"https://api.github.com/users/LeoTestard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-10T20:31:47Z","updated_at":"2016-09-11T18:20:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1746","html_url":"https://github.com/rust-lang/rfcs/pull/1746","diff_url":"https://github.com/rust-lang/rfcs/pull/1746.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1746.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/246195188","html_url":"https://github.com/rust-lang/rfcs/pull/1746#issuecomment-246195188","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1746","id":246195188,"user":{"login":"LeoTestard","id":907750,"avatar_url":"https://avatars.githubusercontent.com/u/907750?v=3","gravatar_id":"","url":"https://api.github.com/users/LeoTestard","html_url":"https://github.com/LeoTestard","followers_url":"https://api.github.com/users/LeoTestard/followers","following_url":"https://api.github.com/users/LeoTestard/following{/other_user}","gists_url":"https://api.github.com/users/LeoTestard/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoTestard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoTestard/subscriptions","organizations_url":"https://api.github.com/users/LeoTestard/orgs","repos_url":"https://api.github.com/users/LeoTestard/repos","events_url":"https://api.github.com/users/LeoTestard/events{/privacy}","received_events_url":"https://api.github.com/users/LeoTestard/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T18:20:41Z","updated_at":"2016-09-11T18:20:41Z","body":"> * A 33% false positive rate is much too high. I hope that we can find some ways to reduce that, either by making the algorithm cleverer, adjusting the FIRST/FOLLOW sets, or adding capabilities to macros.\r\n\r\nOf course it is. But the only way to make the algorithm cleverer in a signficant way is the thing with FOLLOW sets I describe in the unresolved questions. This requires careful thinking and possibly tweaking the way the macro parser works. If feel that we can't do this right now, but @nikomatsakis is the person to ask about this. What sounds like a good plan to me is landing this as an opt-in lint and add maybe this trick later. This way there won't be any unnecessary breakage.\r\n\r\nThe FIRST sets cannot be adjusted a lot, and it will have very little impact on the number of regressions (and none on the proportion of false positives).\r\n\r\n>   * Would it help if we added one-or-none or specific-number matchers? Like x? and x{3} in regular expressions. That can help to nail down the number of tokens something will parse.\r\n\r\nNo, it wouldn't The problem is not that the number is too high, it's that we can't know it for every possible input. Plus, I feel like those would be pretty much niche cases.\r\n\r\n> To go along with the language's goal of stability, if we do something like this I would like there to be a policy decision stipulating that if a syntax change un-future-proofs macros (i.e. adds something to a FIRST set that wasn't there before) then we won't do it.\r\n\r\nOf course, it's the goal of this RFCs. We're not supposed to add anything to the FIRST sets after they are accepted. :)"}}
{"actor":{"display_login":"LeoTestard"}}