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

[beta] backports #123172

Merged
merged 5 commits into from
Mar 29, 2024
Merged

[beta] backports #123172

merged 5 commits into from
Mar 29, 2024

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Mar 28, 2024

r? cuviper

lqd and others added 4 commits March 28, 2024 10:28
(cherry picked from commit 39f2d25)
This commit fixes several issues with the format string parsing of the
`#[diagnostic::on_unimplemented]` attribute that were pointed out by
@ehuss.
In detail it fixes:

* Appearing format specifiers (display, etc). For these we generate a
warning that the specifier is unsupported. Otherwise we ignore them
* Positional arguments. For these we generate a warning that positional
arguments are unsupported in that location and replace them with the
format string equivalent (so `{}` or `{n}` where n is the index of the
positional argument)
* Broken format strings with enclosed }. For these we generate a warning
about the broken format string and set the emitted message literally to
the provided unformatted string
* Unknown format specifiers. For these we generate an additional warning
about the unknown specifier. Otherwise we emit the literal string as
message.

This essentially makes those strings behave like `format!` with the
minor difference that we do not generate hard errors but only warnings.
After that we continue trying to do something unsuprising (mostly either
ignoring the broken parts or falling back to just giving back the
literal string as provided).

Fix rust-lang#122391

(cherry picked from commit 5568c56)
@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2024

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@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 Mar 28, 2024
@cuviper
Copy link
Member Author

cuviper commented Mar 28, 2024

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Mar 28, 2024

📌 Commit 052be5c has been approved by cuviper

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 Mar 28, 2024
@bors
Copy link
Contributor

bors commented Mar 28, 2024

⌛ Testing commit 052be5c with merge c21a2a1...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 28, 2024
[beta] backports

- Do not eat nested expressions' results in `MayContainYieldPoint` format args visitor rust-lang#122680
- Fix heading anchors in doc pages. rust-lang#122693
- Make `#[diagnostic::on_unimplemented]` format string parsing more robust rust-lang#122402

r? cuviper
@bors
Copy link
Contributor

bors commented Mar 28, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 28, 2024
@rust-log-analyzer

This comment has been minimized.

@Noratrieb
Copy link
Member

@bors retry #122671 (comment)

@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 Mar 28, 2024
Errors started showing up, and I read somewhere that this might be
because of old ninja versions. This ninja version is indeed *ancient*.

```
multiple outputs aren't (yet?) supported by depslog; bring this up on the mailing list if it affects you
```

(cherry picked from commit b546764)
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 29, 2024
@cuviper
Copy link
Member Author

cuviper commented Mar 29, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Mar 29, 2024

📌 Commit 10e6ec5 has been approved by cuviper

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Mar 29, 2024

⌛ Testing commit 10e6ec5 with merge c119551...

@bors
Copy link
Contributor

bors commented Mar 29, 2024

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing c119551 to beta...

1 similar comment
@bors
Copy link
Contributor

bors commented Mar 29, 2024

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing c119551 to beta...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 29, 2024
@bors bors merged commit c119551 into rust-lang:beta Mar 29, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 29, 2024
@cuviper cuviper deleted the beta-next branch April 4, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants