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 compiler/fallback mismatch when catching rustc lex error panic #434

Merged
merged 1 commit into from Jan 3, 2024

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 3, 2024

Closes dtolnay/syn#1504.

Before:

error: proc macro panicked
 --> src/main.rs:4:13
  |
4 |     let s = reparse!(" { ");
  |             ^^^^^^^^^^^^^^^
  |
  = help: message: compiler/fallback mismatch #867

After:

error: cannot parse string into token stream
 --> src/main.rs:4:13
  |
4 |     let s = reparse!(" { ");
  |             ^^^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `reparse` (in Nightly builds, run with -Z macro-backtrace for more info)

@dtolnay dtolnay merged commit 6d2899c into master Jan 3, 2024
22 checks passed
@dtolnay dtolnay deleted the mismatch branch January 3, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LitStr::parse can cause panic, "compiler/fallback mismatch"
1 participant