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

Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions #137161

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

dianne
Copy link
Contributor

@dianne dianne commented Feb 17, 2025

See the diff between the two commits for how this affected the error message and suggestion. In order to decide how to format those, the pattern migration diagnostic keeps track of which parts of the user's pattern cause problems in Edition 2024. However, it neglected to do some of this bookkeeping when pointing to macro expansion sites. This fixes that.

@dianne
Copy link
Contributor Author

dianne commented Feb 17, 2025

Looks like this didn't get assigned.. maybe I'm not allowed to ask rustbot for a diagnostics reviewer, but let's try again:
r? diagnostics

@dianne
Copy link
Contributor Author

dianne commented Feb 17, 2025

oops.. I don't expect this will fare any better, but:
r? compiler

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 17, 2025
@dianne
Copy link
Contributor Author

dianne commented Feb 17, 2025

one last attempt: @rustbot ready

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 17, 2025
@compiler-errors
Copy link
Member

r? compiler

@Nadrieril
Copy link
Member

r? Nadrieril @bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 17, 2025

📌 Commit 82678df has been approved by Nadrieril

It is now in the queue for this repository.

@rustbot rustbot assigned Nadrieril and unassigned wesleywiser Feb 17, 2025
@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 Feb 17, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Feb 18, 2025
…or-macros, r=Nadrieril

Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions

See the diff between the two commits for how this affected the error message and suggestion. In order to decide how to format those, the pattern migration diagnostic keeps track of which parts of the user's pattern cause problems in Edition 2024. However, it neglected to do some of this bookkeeping when pointing to macro expansion sites. This fixes that.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies)
 - rust-lang#136457 (Expose algebraic floating point intrinsics)
 - rust-lang#136985 (Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited))
 - rust-lang#137000 (Deeply normalize item bounds in new solver)
 - rust-lang#137151 (Install more signal stack trace handlers)
 - rust-lang#137155 (Organize `OsString`/`OsStr` shims)
 - rust-lang#137161 (Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions)
 - rust-lang#137162 (Move methods from `Map` to `TyCtxt`, part 2.)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 18, 2025
…or-macros, r=Nadrieril

Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions

See the diff between the two commits for how this affected the error message and suggestion. In order to decide how to format those, the pattern migration diagnostic keeps track of which parts of the user's pattern cause problems in Edition 2024. However, it neglected to do some of this bookkeeping when pointing to macro expansion sites. This fixes that.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 18, 2025
…or-macros, r=Nadrieril

Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions

See the diff between the two commits for how this affected the error message and suggestion. In order to decide how to format those, the pattern migration diagnostic keeps track of which parts of the user's pattern cause problems in Edition 2024. However, it neglected to do some of this bookkeeping when pointing to macro expansion sites. This fixes that.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2025
…llaumeGomez

Rollup of 11 pull requests

Successful merges:

 - rust-lang#127793 (Added project-specific Zed IDE settings)
 - rust-lang#134995 (Stabilize const_slice_flatten)
 - rust-lang#135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies)
 - rust-lang#136599 (librustdoc: more usages of `Joined::joined`)
 - rust-lang#136750 (Make ub_check message clear that it's not an assert)
 - rust-lang#137000 (Deeply normalize item bounds in new solver)
 - rust-lang#137126 (fix docs for inherent str constructors)
 - rust-lang#137151 (Install more signal stack trace handlers)
 - rust-lang#137161 (Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions)
 - rust-lang#137167 (tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg)
 - rust-lang#137177 (Update `minifier-rs` version to `0.3.5`)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 18, 2025
…or-macros, r=Nadrieril

Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions

See the diff between the two commits for how this affected the error message and suggestion. In order to decide how to format those, the pattern migration diagnostic keeps track of which parts of the user's pattern cause problems in Edition 2024. However, it neglected to do some of this bookkeeping when pointing to macro expansion sites. This fixes that.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#135711 (Do not ICE on default_field_value const with lifetimes)
 - rust-lang#136599 (librustdoc: more usages of `Joined::joined`)
 - rust-lang#136876 (Locking documentation updates)
 - rust-lang#137000 (Deeply normalize item bounds in new solver)
 - rust-lang#137126 (fix docs for inherent str constructors)
 - rust-lang#137161 (Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions)
 - rust-lang#137191 (Update mdbook and move error_index_generator)
 - rust-lang#137203 (Improve MIR modification)
 - rust-lang#137206 (Make E0599 a structured error)
 - rust-lang#137218 (misc `layout_of` cleanup)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 54db888 into rust-lang:master Feb 19, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 19, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
Rollup merge of rust-lang#137161 - dianne:pat-migration-bookkeeping-for-macros, r=Nadrieril

Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions

See the diff between the two commits for how this affected the error message and suggestion. In order to decide how to format those, the pattern migration diagnostic keeps track of which parts of the user's pattern cause problems in Edition 2024. However, it neglected to do some of this bookkeeping when pointing to macro expansion sites. This fixes that.
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.

6 participants