-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Port #[should_panic]
to the new attribute parsing infrastructure
#143808
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
base: master
Are you sure you want to change the base?
Port #[should_panic]
to the new attribute parsing infrastructure
#143808
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
@@ -1,4 +1,3 @@ | |||
//@ check-pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change! Malformed should_panic
attributes have had the following warning since 2016:
warning: argument must be of the form: `expected = "error message"`
--> src/main.rs:5:1
|
5 | #[should_panic(expected = "foo", bar)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: errors in this attribute were erroneously allowed and will become a hard error in a future release
This PR makes this an error.
As discussed in #142838 (comment), we can make breaking changes as long as we do a crater run. So this PR needs a crater run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue is currently NOT solved by this PR.
We can do this in a future PR or now, but we should decide whether this should be a warning or error:
#143799
☔ The latest upstream changes (presumably #143810) made this pull request unmergeable. Please resolve the merge conflicts. |
9014cc9
to
dd9d982
Compare
dd9d982
to
41f9368
Compare
☔ The latest upstream changes (presumably #143779) made this pull request unmergeable. Please resolve the merge conflicts. |
bee8d3d
to
4b68dc9
Compare
☔ The latest upstream changes (presumably #144044) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors try |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
4b68dc9
to
877a65d
Compare
@bors try |
Port `#[should_panic]` to the new attribute parsing infrastructure Ports `#[should_panic]` to the new attribute parsing infrastructure for #131229 (comment) r? `@jdonszelmann`
Crater analysis:
So 3 regressions, the rest is all spurious. @jdonszelmann I think calling in the lang team for a decision is next? |
@rust-lang/lang ? |
If we could please make PRs to the three affected crates, that'd be good, as it's something the team might ask to see. Otherwise, this sounds right to me, so let's... @rfcbot fcp merge cc @rust-lang/lang-docs |
This comment was marked as duplicate.
This comment was marked as duplicate.
@traviscross |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
This seems fine, and I'm checking my box here. I'm wondering, though: how difficult is it, in the new attribute parsing infrastructure, be to accept and ignore |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
@joshtriplett |
Thanks. We'll discuss with the nomination. For our notes, the applicable Reference text: "The |
We talked about this after the meeting, and we weren't motivated to change what is here and under FCP. |
Ports
#[should_panic]
to the new attribute parsing infrastructure for #131229 (comment)r? @jdonszelmann