-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
“Let NullaryConstructor = something;” causes internal compiler error: “tried to overwrite interned AdtDef” #37026
Comments
Works fine on 1.11. |
This happens when
I have no idea how |
Fix for beta is in #37078 |
Nice job @petrochenkov |
Temporary fix for metadata decoding for struct constructors Same as #37078, but for nightly. Ideally, metadata lookup functions should "just work" for constructor ids, but this fixes the issue as well. Fixes #37026 r? @alexcrichton
I was trying an
if let
pattern match for a nullary constructor like this:but the compiler choked on the pattern match in an unexpected way. The fact that it's qualified does not seem to matter. See minimal repro below.
I tried this code:
I expected to see this happen:
An plain, ordinary, not-scary type error.
Instead, this happened:
Meta
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: