Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make doc stubs for builtin macros reflect existing support for trailing commas #46260

Merged
merged 2 commits into from
Dec 4, 2017

Conversation

ExpHP
Copy link
Contributor

@ExpHP ExpHP commented Nov 25, 2017

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.

@rust-highfive
Copy link
Collaborator

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
Copy link
Contributor Author

ExpHP commented Nov 25, 2017

r? @steveklabnik

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Nov 25, 2017
@durka
Copy link
Contributor

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
Copy link
Contributor

durka commented Nov 27, 2017

You should probably also update the duplicate definitions in libcore (the existence of which is also unfortunate).

@shepmaster
Copy link
Member

Ping from triage @steveklabnik — it's been over 3 days and we haven't heard from you :-)

Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! this is great.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Dec 1, 2017

📌 Commit 31b8a15 has been approved by steveklabnik

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 1, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Dec 3, 2017
…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.
bors added a commit that referenced this pull request Dec 3, 2017
Rollup of 8 pull requests

- Successful merges: #45957, #46260, #46432, #46442, #46454, #46462, #46465, #46473
- Failed merges:
@bors
Copy link
Contributor

bors commented Dec 4, 2017

⌛ Testing commit 31b8a15 with merge fdfbcf8...

@bors bors merged commit 31b8a15 into rust-lang:master Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants