-
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
ICE: the type u8
has an unknown layout
#36036
Comments
I'm also getting this ICE. Here's a more minimal example:
And here's the error:
|
This is a regression from stable to beta. |
Introduced in Slightly smaller example: trait Context {
type Container: ?Sized;
}
impl Context for u16 {
type Container = u8;
}
struct Wrapper<C: Context> {
container: *const C::Container
}
fn foobar(_: Wrapper<u16>) {}
fn main() {} |
Seems like pointers need to be normalized specially (as we don't recurse through them). |
triage: P-high Assigning to @eddyb to start since he seems to have a clue what the problem is. |
assigning to self to try to lift load from @eddyb |
I have a fix in the works, will post PR soon. |
We were treating an associated type as unsized even when the concrete instantiation was actually sized. Fix is to normalize before checking if it is sized.
reopening since this is still a regression on beta |
We were treating an associated type as unsized even when the concrete instantiation was actually sized. Fix is to normalize before checking if it is sized.
We were treating an associated type as unsized even when the concrete instantiation was actually sized. Fix is to normalize before checking if it is sized.
This has been backported in #36538 so this issue may be closed. |
We were treating an associated type as unsized even when the concrete instantiation was actually sized. Fix is to normalize before checking if it is sized.
(See #36036 (comment) for shorter example)
I tried this code:
with
tokio-core
at b9395808bea624e6b64bcafbf6cc05cabdaca6cc,tokio-proto
at 9b694ed5d92a9614058674032a37836300727314tokio-service
at 821739abb9a9c138d84ea1a81c90809af7530e08futures
at ecbca61c8123eff5b939933d9fe0633b522be52bI expected to see this happen: compilation success
Instead, this happened: crashed nightly and beta compiler
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: