-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Compiler panic on enum variants with trait objects #32765
Comments
Thanks. It is also present in nightly, where the error message is
|
Following on from #34182, this code also produces the error: pub trait A {}
pub enum C {
A(A),
}
fn main() {
let _: Option<Box<C>> = None;
} |
I've come here from #34182 I think I have run into the same issue from the code in this commit: https://github.com/eightbitraptor/otaku/commit/0ef3e0d06f5c72e8a51de3861e6fa8f58e276061 Which I expected to compile without issue (I introduce a new I am using
And the error I get is:
|
This is essentially a duplicate of #16812. |
Closing in favor of #16812. |
The compiler panics with certain combinations of enum variants with trait objects. See the minimal example below.
I tried this code:
I expected to see this happen: A error message or the compiler passing fine
Instead, this happened: The compiler paniced
Meta
Backtrace:
(build with stable release)
The text was updated successfully, but these errors were encountered: