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 on type mismatch: Index out of bounds #31964
Comments
sanxiyn
added
the
I-ICE
label
Mar 1, 2016
This comment has been minimized.
This comment has been minimized.
|
Even smaller test case: fn main() {
// each statement produces the same ICE
let _: &mut String = &mut Vec::new();
let _: &String = &Vec::new();
let _: &() = &Vec::new();
}(Edited with more examples). |
This comment has been minimized.
This comment has been minimized.
|
Nominating because this seems to be coming up all over the place, I think we've gotten 3-4 separate reports about this ICE (a regression on beta). Note that an ICE happens on stable, but a worse ICE happens on beta/nightly... |
This comment has been minimized.
This comment has been minimized.
|
To be more precise, the regression is that the actual error message about mismatched types only shows up on stable and not on beta or nightly. |
This comment has been minimized.
This comment has been minimized.
|
related to #25801 |
This comment has been minimized.
This comment has been minimized.
nikomatsakis
self-assigned this
Apr 21, 2016
rust-highfive
added
P-high
and removed
I-nominated
labels
Apr 21, 2016
This comment has been minimized.
This comment has been minimized.
|
Not method resolution, but rather coercion ( |
This comment has been minimized.
This comment has been minimized.
Don42
commented
May 2, 2016
|
I am running rustc 1.8.0 from debian SID and I get the same error, but |
Moredread
referenced this issue
May 9, 2016
Closed
ICE: When using mismatching versions of the image and the glium_graphics crate #33515
TimNN
referenced this issue
May 14, 2016
Closed
Calling read_to_string and passing in a &Vec causes a compiler panic on beta / nightly #33616
This comment has been minimized.
This comment has been minimized.
|
So I tried to use the snapshotting mechanism in the ObligationGraph in a similar fashion to #26324, but it does not work since coercion executes |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis I thought I fixed coercion to never use |
This comment has been minimized.
This comment has been minimized.
|
@eddyb Probably the latter. Coercion calls into |
This comment has been minimized.
This comment has been minimized.
|
It may be possible to refactor this call upward, not sure. |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis Oh, I had removed only the call from within |
This comment has been minimized.
This comment has been minimized.
|
I suppose we could manually call |
crumblingstatue commentedFeb 29, 2016
Test case:
Output: