Uh oh!
There was an error while loading. Please reload this page.
Make doc stubs for builtin macros reflect existing support for trailing commas - #46260
Conversation
rust-highfive
commented
Nov 25, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
ExpHP
commented
Nov 25, 2017
durka
commented
Nov 27, 2017
These definitions have been wrong so many times... it would be great if there were a way to test them. |
durka
commented
Nov 27, 2017
You should probably also update the duplicate definitions in libcore (the existence of which is also unfortunate). |
shepmaster
commented
Dec 1, 2017
Ping from triage @steveklabnik — it's been over 3 days and we haven't heard from you :-) |
steveklabnik
left a comment
There was a problem hiding this comment.
Thank you! this is great.
steveklabnik
commented
Dec 1, 2017
@bors: r+ rollup |
bors
commented
Dec 1, 2017
📌 Commit 31b8a15 has been approved by |
…veklabnik Make doc stubs for builtin macros reflect existing support for trailing commas This modifies the `macro_rules!` stubs in `std` for some of the compiler builtin macros in order to better reflect their currently supported grammar. To my understanding these stubs have no impact on compiler output whatsoever, and only exist so that they may appear in the documentation. P.S. It is in fact true that `env!` supports trailing commas while `option_env!` currently does not. (I have another issue for this) I don't imagine there's any way to automatically test these stubs, but I did *informally* test the new definitions on the playpen to see that they accept the desired invocations, as well as inspect the updated doc output.
This modifies the
macro_rules!stubs instdfor some of the compiler builtin macros in order to better reflect their currently supported grammar. To my understanding these stubs have no impact on compiler output whatsoever, and only exist so that they may appear in the documentation.P.S. It is in fact true that
env!supports trailing commas whileoption_env!currently does not. (I have another issue for this)I don't imagine there's any way to automatically test these stubs, but I did informally test the new definitions on the playpen to see that they accept the desired invocations, as well as inspect the updated doc output.