Skip to content

Change proc_macro::Diagnostics docs #87836

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

Merged
merged 2 commits into from
Aug 8, 2021
Merged

Change proc_macro::Diagnostics docs #87836

merged 2 commits into from
Aug 8, 2021

Conversation

tsoutsman
Copy link
Contributor

@tsoutsman tsoutsman commented Aug 7, 2021

With Rust 1.54 attributes can invoke function-like macros. This allows functions generated by macros to have non-generic documentation. This pull request changes the documentation of proc_macro::Diagnostics to be more specific and include a link to the level.

Example

Before:

Adds a new child diagnostic message to `self` with the level
identified by this method’s name with the given `message`.

After:

Adds a new child diagnostic message to self with the [`Level::Error`]
level, and the given `message`.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 7, 2021
@petrochenkov
Copy link
Contributor

Could you wrap the lines to fit into the usual 100-character limit? rustfmt cannot do it automatically in this case.

r=me after doing that and squashing commits.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 7, 2021
Add links

Fit 100-character limit
@tsoutsman
Copy link
Contributor Author

Hi, I'm not quite sure about the indentation so I just put it in line with concat!
r= @petrochenkov

@petrochenkov
Copy link
Contributor

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Aug 7, 2021

📌 Commit 75e8035 has been approved by petrochenkov

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 7, 2021
@petrochenkov
Copy link
Contributor

petrochenkov commented Aug 8, 2021

@tsoutsman
Push to a pull request after approval (@bors r+) cancels the approval.
Also using rebases instead of merges is recommended to update pull request branches.

@petrochenkov petrochenkov reopened this Aug 8, 2021
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 8, 2021

📌 Commit 26bf0ef has been approved by petrochenkov

@tsoutsman
Copy link
Contributor Author

@tsoutsman
Push to a pull request after approval (@bors r+) cancels the approval.
Also using rebases instead of merges is recommended to update pull request branches.

Sorry, I was just playing around with the repository. I'm not too familiar with git.

@bors
Copy link
Collaborator

bors commented Aug 8, 2021

⌛ Testing commit 26bf0ef with merge e8c25f2...

@bors
Copy link
Collaborator

bors commented Aug 8, 2021

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing e8c25f2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 8, 2021
@bors bors merged commit e8c25f2 into rust-lang:master Aug 8, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

5 participants