Skip to content

Allow for reparsing failure when reparsing a pasted metavar. #139464

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

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Apr 7, 2025

Fix some metavar reparsing issues.

Fixes #139248 and #139445.

r? @petrochenkov

@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 Apr 7, 2025
@nnethercote
Copy link
Contributor Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 7, 2025
…5, r=<try>

Allow for reparsing failure when reparsing a pasted metavar.

Allow for reparsing failure when reparsing a pasted metavar.

Fixes rust-lang#139445.

The additional errors aren't great but the first one is still good and
it's the most important, and imperfect errors are better than ICEing.

r? `@petrochenkov`
@bors
Copy link
Collaborator

bors commented Apr 7, 2025

⌛ Trying commit 2d59c6b with merge 40c3638...

@bors
Copy link
Collaborator

bors commented Apr 7, 2025

☀️ Try build successful - checks-actions
Build commit: 40c3638 (40c36385e85649eea9746c7b363487c032cf35ba)

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 7, 2025
This can happen when invalid syntax is passed to a declarative macro. We
shouldn't be too strict about the token stream position once the parser
has rejected the invalid syntax.

Fixes rust-lang#139248.
Fixes rust-lang#139445.

The additional errors aren't great but the first one is still good and
it's the most important, and imperfect errors are better than ICEing.
@nnethercote nnethercote force-pushed the fix-139248-AND-fix-139445 branch from 2d59c6b to e177921 Compare April 8, 2025 02:12
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 8, 2025

📌 Commit e177921 has been approved by petrochenkov

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 8, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 8, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#138676 (Implement overflow for infinite implied lifetime bounds)
 - rust-lang#139024 (Make error message for missing fields with `..` and without `..` more consistent)
 - rust-lang#139098 (Tell LLVM about impossible niche tags)
 - rust-lang#139124 (compiler: report error when trait object type param reference self)
 - rust-lang#139321 (Update to new rinja version (askama))
 - rust-lang#139346 (Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check`)
 - rust-lang#139386 (make it possible to use stage0 libtest on compiletest)
 - rust-lang#139421 (Fix trait upcasting to dyn type with no principal when there are projections)
 - rust-lang#139464 (Allow for reparsing failure when reparsing a pasted metavar.)
 - rust-lang#139490 (Update some comment/docs related to "extern intrinsic" removal)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 24369ad into rust-lang:master Apr 8, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 8, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 8, 2025
Rollup merge of rust-lang#139464 - nnethercote:fix-139248-AND-fix-139445, r=petrochenkov

Allow for reparsing failure when reparsing a pasted metavar.

Fix some metavar reparsing issues.

Fixes rust-lang#139248 and rust-lang#139445.

r? `@petrochenkov`
@nnethercote nnethercote deleted the fix-139248-AND-fix-139445 branch April 8, 2025 21:13
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.

ICE: no close delim when reparsing Expr
4 participants