-
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: librustc/mir/tcx.rs:68: extracting field of non-tuple non-adt: Ty { ty: _ } #55552
Comments
This is almost certainly a very recent injection (and I think it was my PR, and its probably on beta branch too). Investigating now. |
Oddly I can't get to the ICE because I cannot compile Update: oh well I might have also needed to run |
no surprise, this was injected between nightly-2018-10-27-x86_64-unknown-linux-gnu - rustc 1.31.0-nightly (3e6f30e 2018-10-26) (which works) and nightly-2018-10-28-x86_64-unknown-linux-gnu - rustc 1.31.0-nightly (cae6efc 2018-10-27) (which does not work). I'm the one who wrote the code that is ICE'ing, I'll try to have a fix up soon. |
Working on making an isolated test case now; I think the ICE is originating from compiling the body of |
Okay here's a really small test case that replicates the problem on play. It currently relies on extern crate rayon; // 1.0.2
struct A;
struct B;
struct C;
fn main() {
let ((_a, _b), _c): (_, C) = rayon::join(
|| { (A, B) },
|| { C });
} Interestingly this is happening on code that isn't even opting into NLL; I didn't expect that... |
Okay and here's a standalone test struct X;
struct Y;
struct Z;
pub fn join<A, B, RA, RB>(_oper_a: A, _oper_b: B) -> (RA, RB)
where A: FnOnce() -> RA + Send,
B: FnOnce() -> RB + Send,
RA: Send,
RB: Send
{
loop { }
}
fn main() {
let ((_x, _y), _z): (_, Z) = join(|| (X, Y),
|| Z);
} |
Its an interesting bug; even just doing the following is enough to bypass the ICE: let ((_x, _y), _z): ((_, _), Z) = ... |
Note that since this is an ICE, we don't get to use our usual excuse of "NLL migration mode automatically handles NLL-complete issues." That's why this s P-high. |
…rojections-out-of-a-ty-var, r=nikomatsakis Do not attempt to ascribe projections out of a ty var If we encounter `_` ascribed to structural pattern like `(a, b)`, just skip relate_types. Fix #55552
An underscore (aka wildcard aka
_
) nested within a type declaration is causing problems for some new code that tries to project out the inner types after normalization is finished. Here is an example (play):Original bug report follows
Running
cargo test
hereThe text was updated successfully, but these errors were encountered: