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

Handle several #[diagnostic::on_unimplemented] attributes correctly #116642

Merged

Conversation

weiznich
Copy link
Contributor

This PR fixes an issues where rustc would ignore subsequent #[diagnostic::on_unimplemented] attributes. The corresponding RFC specifies that the first matching instance of each option is used. Invalid attributes are linted and otherwise ignored.

This PR fixes an issues where rustc would ignore subsequent
`#[diagnostic::on_unimplemented]` attributes. The [corresponding
RFC](https://rust-lang.github.io/rfcs/3368-diagnostic-attribute-namespace.html)
specifies that the first matching instance of each option is used.
Invalid attributes are linted and otherwise ignored.
@rustbot
Copy link
Collaborator

rustbot commented Oct 11, 2023

r? @wesleywiser

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 11, 2023
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

I don't particularly like this behavior -- I think it should be an error for now, maybe with a diagnostic suggestion to combine all of these metas into one attr. But I guess we can accept this now.

@compiler-errors
Copy link
Member

r? compiler-errors @bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 12, 2023

📌 Commit 232aaeb has been approved by compiler-errors

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 12, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 12, 2023
…ed_improvements, r=compiler-errors

Handle several `#[diagnostic::on_unimplemented]` attributes correctly

This PR fixes an issues where rustc would ignore subsequent `#[diagnostic::on_unimplemented]` attributes. The [corresponding RFC](https://rust-lang.github.io/rfcs/3368-diagnostic-attribute-namespace.html) specifies that the first matching instance of each option is used. Invalid attributes are linted and otherwise ignored.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 12, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#116593 (Add unstable book page for the no-jump-tables codegen option)
 - rust-lang#116625 (`rustc_hir_pretty` cleanups)
 - rust-lang#116642 (Handle several `#[diagnostic::on_unimplemented]` attributes correctly)
 - rust-lang#116654 (coverage: Clarify loop-edge detection and graph traversal)
 - rust-lang#116669 (Fix mips platform support entries.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5f90bee into rust-lang:master Oct 12, 2023
11 checks passed
@rustbot rustbot added this to the 1.75.0 milestone Oct 12, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 12, 2023
Rollup merge of rust-lang#116642 - weiznich:diagnostic_on_unimplemented_improvements, r=compiler-errors

Handle several `#[diagnostic::on_unimplemented]` attributes correctly

This PR fixes an issues where rustc would ignore subsequent `#[diagnostic::on_unimplemented]` attributes. The [corresponding RFC](https://rust-lang.github.io/rfcs/3368-diagnostic-attribute-namespace.html) specifies that the first matching instance of each option is used. Invalid attributes are linted and otherwise ignored.
bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Oct 13, 2023
50: Automated pull from upstream `master` r=Dajamante a=github-actions[bot]


This PR pulls the following changes from the upstream repository:

* rust-lang/rust#116619
* rust-lang/rust#115964
* rust-lang/rust#116391
* rust-lang/rust#116510
* rust-lang/rust#116671
  * rust-lang/rust#116669
  * rust-lang/rust#116654
  * rust-lang/rust#116642
  * rust-lang/rust#116625
  * rust-lang/rust#116593
* rust-lang/rust#116649
* rust-lang/rust#116600
* rust-lang/rust#116628



Co-authored-by: Nadrieril <nadrieril+git@gmail.com>
Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com>
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Co-authored-by: Nicholas Nethercote <n.nethercote@gmail.com>
Co-authored-by: Trevor Gross <tmgross@umich.edu>
Co-authored-by: Georg Semmler <github@weiznich.de>
Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
Co-authored-by: Gurinder Singh <frederick.the.fool@gmail.com>
Co-authored-by: bors <bors@rust-lang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants