Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUnexpected tail in unsized_info_ty: usize for ty=process::Core<isize, isize, isize> #32377
Comments
This comment has been minimized.
This comment has been minimized.
|
This is the smallest test case I could find : use std::mem;
use std::marker::PhantomData;
trait Foo {
type Error;
}
struct Bar<U: Foo> {
stream: PhantomData<U::Error>,
}
fn foo<U: Foo>() -> Bar<U> {
unsafe { mem::transmute([0u32; 4]) }
}
I am puzzled by the fact that isize does not appear once in the snippet. Potentially related, if I change the transmute to eg |
This comment has been minimized.
This comment has been minimized.
|
Going down the rabbit hole, Later, From my limited understanding of Where the latest nightly differs, is at type_of.rs#L59. Instead of using a using a pointer for the second field, it now calls This is going a bit too deep into the compiler internals for me, but I think 1d7c9bd only made this existing problem visible. I'm not sure how substituting an isize can really work, especially when dealing with associated types. Here's the relevant debug output from
|
This comment has been minimized.
This comment has been minimized.
|
Here is a related ICE on stable http://is.gd/OozIh7 Instead, it would have to substitute it first by a type whose associated type is Sized, then by one which isn't, recursively and exponentially for each type parameter / associated type. However, this is probably hinting at the fact that substitution by dummy types isn't the right way to do it, no that I have any idea what that would be. |
This comment has been minimized.
This comment has been minimized.
|
Guess this is a good time to move representation higher up to not depend on LLVM. |
eddyb
self-assigned this
Mar 21, 2016
eddyb
closed this
Mar 22, 2016
eddyb
reopened this
Mar 22, 2016
This comment has been minimized.
This comment has been minimized.
|
Discussed in @rust-lang/compiler meeting. This is tricky to prioritize. @eddyb is right that the best solution is to stop relying on LLVM to compute sizes for us. Moreover, the examples given -- or at least the first one -- are in error (even though they ought not to ICE). It's very odd that the stable compiler accepts it. @plietar, do you have any inkling of the code in the original crate that is now ICEing? |
This comment has been minimized.
This comment has been minimized.
|
I've run into this ICE when building the eventual crate. This is causing my librespot build to fail on nightly as opposed to nightly 2016-03-17 or earlier |
This comment has been minimized.
This comment has been minimized.
|
@plietar Looking at that code, it is a You can just use |
This comment has been minimized.
This comment has been minimized.
|
Just ran into this, FWIW, in some old hacky code that turned out to be unnecessary. (I wanted to write |
euclio
added a commit
to euclio/eventual
that referenced
this issue
Mar 30, 2016
This comment has been minimized.
This comment has been minimized.
|
This regression is also present in |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Hitting this means the code was wrong to begin with (and will receive a |
This comment has been minimized.
This comment has been minimized.
|
Ah yeah sorry to clarify I just ran a crate report against stable and those two crates just showed up with this same assertion (sorry I don't know much about the underlying issue here) |
This comment has been minimized.
This comment has been minimized.
|
@eddyb For what definition of wrong? Are you saying that |
This comment has been minimized.
This comment has been minimized.
|
@comex Actually, I've taken a closer look and neither I guess I'll try to track it down before working on the generalized solution. |
This comment has been minimized.
This comment has been minimized.
|
Turns out that |
This comment has been minimized.
This comment has been minimized.
|
triage: P-high |
rust-highfive
added
P-high
and removed
I-nominated
labels
Mar 31, 2016
carllerche
added a commit
to carllerche/eventual
that referenced
this issue
Apr 2, 2016
This comment has been minimized.
This comment has been minimized.
|
@eddyb are you saying that the value is considered unsized because |
plietar commentedMar 20, 2016
Hi,
compiling the eventual crate with the latest rust nightly (2016-03-20) gives me the following ICE. The previous nightly (2016-03-17) worked fine.
EDIT: I had copied the rust nightly versions incorrectly