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

Fix up a Fluent message #104345

Merged
merged 1 commit into from
Nov 13, 2022
Merged

Fix up a Fluent message #104345

merged 1 commit into from
Nov 13, 2022

Conversation

fmease
Copy link
Member

@fmease fmease commented Nov 13, 2022

Fix up a Fluent message which contained arrows -> after selectors. The original author probably thought that they were required as part of the selector syntax but in reality they were interpreted as literal text and actually showed up in the emitted diagnostic.

This wasn't caught during the diagnostic migration since the branch constructing the diagnostic in question (rustc_infer::errors::LifetimeMismatchLabels::Normal) was not exercised by the UI test suite. I've added two more test cases to do so (one testing LifetimeMismatchLabels::Normal where hir_equal == true and one where hir_equal == false).

Diff visualizing the -> bug (master vs fix-up-a-fluent-message):

 error[E0623]: lifetime mismatch
   --> src/test/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs:39:30
    |
 39 | fn badboi3<'in_, 'out, T>(a: Foo<'in_, 'out, (&'in_ T, &'out T)>, sadness: &'in_ T) {
    |                              ^^^^^^^^^^^^^^^^^-------^^-------^^
    |                              |                |
    |                              |                these two types are declared with different lifetimes...
-   |                              ...but data->  from `a` flows->  into `a` here
+   |                              ...but data from `a` flows into `a` here

@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2022

r? @compiler-errors

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

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 Nov 13, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2022

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 13, 2022

📌 Commit 23dadb5 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 Nov 13, 2022
@fmease fmease changed the title Fix up a fluent message Fix up a Fluent message Nov 13, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 13, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#103650 (rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`)
 - rust-lang#104177 (rustdoc: use consistent "popover" styling for notable traits)
 - rust-lang#104318 (Move tests)
 - rust-lang#104323 (rustdoc: remove no-op CSS `.scrape-help { background: transparent }`)
 - rust-lang#104345 (Fix up a Fluent message)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@fmease
Copy link
Member Author

fmease commented Nov 13, 2022

Oh no, I forgot to get rid of the -> after the *[false] selectors 🤦‍♂️. I shouldn't be writing PRs at 4:30 AM. Anyway, I am gonna fix that at some point in the future.

@bors bors merged commit 05cd26b into rust-lang:master Nov 13, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 13, 2022
@compiler-errors
Copy link
Member

🤦 it's ok, it's not like I noticed it either

@fmease fmease deleted the fix-up-a-fluent-message branch November 13, 2022 17:41
fmease added a commit to fmease/rust that referenced this pull request May 22, 2024
Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in rust-lang#104345 (2022) but didn't update all instances as I've noted here: rust-lang#104345 (comment) (“the future is now!”).
fmease added a commit to fmease/rust that referenced this pull request May 22, 2024
Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in rust-lang#104345 (2022) but didn't update all instances as I've noted here: rust-lang#104345 (comment) (“the future is now!”).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 23, 2024
Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in rust-lang#104345 (2022) but didn't update all instances as I've noted here: rust-lang#104345 (comment) (“the future is now!”).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 23, 2024
Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in rust-lang#104345 (2022) but didn't update all instances as I've noted here: rust-lang#104345 (comment) (“the future is now!”).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 23, 2024
Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in rust-lang#104345 (2022) but didn't update all instances as I've noted here: rust-lang#104345 (comment) (“the future is now!”).
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 23, 2024
Rollup merge of rust-lang#125210 - fmease:fix-up-some-diags, r=davidtwco

Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in rust-lang#104345 (2022) but didn't update all instances as I've noted here: rust-lang#104345 (comment) (“the future is now!”).
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request May 24, 2024
Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in #104345 (2022) but didn't update all instances as I've noted here: rust-lang/rust#104345 (comment) (“the future is now!”).
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request May 24, 2024
Cleanup: Fix up some diagnostics

Several diagnostics contained their error code inside their primary message which is no bueno.
This PR moves them out of the message and turns them into structured error codes.

Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in #104345 (2022) but didn't update all instances as I've noted here: rust-lang/rust#104345 (comment) (“the future is now!”).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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

4 participants