-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Enum variant with GAT field fails to derive Sized #80626
Comments
Surprisingly, this also doesn't compile: #![feature(generic_associated_types)]
#![allow(incomplete_features)]
trait Allocator {
type Allocated<T>;
}
enum LinkedList<A: Allocator> {
Head,
Next(i64, A::Allocated<Self>)
}
fn main() {}
|
I have checked that changing |
Examples that compile:
|
GATs issue triage: not blocking. While this bug is unfortunate, this isn't really a GATs problem, per se. Proper fix is probably a coinductive |
This code now compiles fine without the above error |
I tried this code:
I expected to see this happen: Enum successfully compiles and can be constructed.
Instead, this happened:
Interestingly, this compiles:
As does this:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: