Skip to content

Conversation

@ltratt
Copy link
Member

@ltratt ltratt commented Jan 20, 2026

At the moment the code happens to work only because of an oversight in rustc: that oversight is likely to be fixed soon (rust-lang/rust#150681).

@meithecatte If you're able to do so, I'd be grateful if you can confirm this addresses the rustc issue properly. If so, I will then make a new release shortly after so that we're not blocking the rustc PR.

At the moment the code happens to work only because of an oversight in
rustc: that oversight is likely to be fixed soon
(rust-lang/rust#150681).
@ratmice
Copy link
Collaborator

ratmice commented Jan 20, 2026

I'm happy to approve.

I was able to reproduce the error from the crater log in #620 on current rustc by adding a second variant to LexerKind and compiling with cargo build --all-targets since the error only occurs with cfg(test).

Edit: The test worked as expected (failed on the master branch, and worked with this one)

@ratmice ratmice added this pull request to the merge queue Jan 20, 2026
@ltratt
Copy link
Member Author

ltratt commented Jan 20, 2026

@ratmice Cool, and thanks! So we're confident with this PR merged, we won't trigger the upcoming-rustc change?

Merged via the queue into softdevteam:master with commit 3faebcc Jan 20, 2026
2 checks passed
@ratmice
Copy link
Collaborator

ratmice commented Jan 20, 2026

If my understanding of the problem is right, adding another variant it should behave the same on both the new and old compilers, since the change seems to be making single variant #[non_exhaustive]` behave as they had multiple variants on the new compiler.

I'd still wait for feedback from @meithecatte before release, in case they can conveniently test on the new compiler though, or my understanding is flawed.

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.

2 participants