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 upICE with nightly in LvalyeTy<'tcx>::protection_ty #31504
Comments
nagisa
added
I-ICE
A-mir
labels
Feb 9, 2016
nagisa
self-assigned this
Feb 9, 2016
This comment has been minimized.
This comment has been minimized.
|
Minimal-ish reproduction: use std::marker::PhantomData;
pub trait DataBind {
type Data;
}
impl<T> DataBind for Global<T> {
type Data = T;
}
pub struct Global<T>(PhantomData<T>);
pub struct Data {
pub offsets: <Global<[f32; 1]> as DataBind>::Data,
}
pub fn main() {
let mut d = Data { offsets: [0.0] };
d.offsets[0] = 0.0;
} |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis this might be more up your alley than mine. |
nagisa
added
the
regression-from-stable-to-nightly
label
Feb 9, 2016
nagisa
removed their assignment
Feb 9, 2016
This comment has been minimized.
This comment has been minimized.
|
This is because |
This comment has been minimized.
This comment has been minimized.
|
Actually, normalizing will ruin regions, preventing borrowck from running (no, I don't want to run region inference each time). I guess that field expressions will have to store the normalized type. What do you think of it, @nikomatsakis? |
arielb1
added
I-nominated
T-compiler
labels
Feb 9, 2016
This comment has been minimized.
This comment has been minimized.
|
Nominating because regression. This issue is also visible on my MIR typeck branch. |
kvark
changed the title
ICE with nightly in in LvalyeTy<'tcx>::protection_ty
ICE with nightly in LvalyeTy<'tcx>::protection_ty
Feb 10, 2016
This comment has been minimized.
This comment has been minimized.
|
@nagisa thanks for composing the test case! |
This comment has been minimized.
This comment has been minimized.
|
Storing the normalized type seems reasonable to me as a first step, though @arielb1 I'd expect typeck to revalidate that. |
This comment has been minimized.
This comment has been minimized.
|
However, the problem that @arielb1 referred to of having to re-run region inference suggests that perhaps there is a reason to resurrect that old patch of mine that "extracts" regions and types rather than inferring them when doing trait matching. It would avoid the need to re-run inference, I believe. (Also, lazy normalization seems like it would help here too, of course.) |
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Feb 10, 2016
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Feb 11, 2016
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Feb 11, 2016
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Feb 11, 2016
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Feb 11, 2016
This comment has been minimized.
This comment has been minimized.
|
triage: P-high (regression) |
rust-highfive
added
P-high
and removed
I-nominated
labels
Feb 11, 2016
This comment has been minimized.
This comment has been minimized.
|
Note that this is fixed in @arielb1's branch. |
nrc
assigned
arielb1
Feb 11, 2016
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Feb 13, 2016
arielb1
referenced this issue
Feb 13, 2016
Closed
error: internal compiler error: cannot get field of type: ... #31603
This comment has been minimized.
This comment has been minimized.
|
Looks like it's fixed now, thanks! |
kvark
closed this
Feb 16, 2016
This comment has been minimized.
This comment has been minimized.
kvark
reopened this
Feb 17, 2016
This comment has been minimized.
This comment has been minimized.
|
If this is indeed #31603, I still encounter it with latest Nightly: https://travis-ci.org/fxbox/thinkerbell/jobs/109967451 |
This comment has been minimized.
This comment has been minimized.
|
Fix for this didn't land yet.
|
bors
closed this
in
3c6f410
Feb 20, 2016
This comment has been minimized.
This comment has been minimized.
|
Ok, fix confirmed: https://travis-ci.org/fxbox/thinkerbell/jobs/111150793 |
kvark commentedFeb 9, 2016
It works fine with rust-beta (1.7) and rust-stable (1.6).
Repro steps:
cargo test), assuming you have glfw3 and X libraries installed. I'll try to narrow down the problem to a simpler case.Backtrace: