-
Notifications
You must be signed in to change notification settings - Fork 13k
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
internal compiler error: Impl DefId { krate: 0, node: 12 }:u32.Stringify was matchable against Obligation(predicate=Binder(TraitPredicate(Stringify)),depth=0) but now is not #23825
Comments
I've also just run into this, here's the error and the backtrace.
I haven't yet been able to isolate the culprit code, I'll keep searching and post it if I come across it. Just thought I'd share this first. This occurred on |
Not sure if this helps at all, but I was able to side-step this ICE in my own code by changing an incorrect generic integer to a correct generic float. To be exact, I changed this (which should have been a compile error, but ICEd): let mut half_prev_width = 0; to this (which compiles fine): let mut half_prev_width = 0.0; The following is the block of code in which this occurred: let multi = if let Direction::Right = direction { 1.0 } else { -1.0 };
let mut half_prev_width = 0;
for element in elements.into_iter() {
let element = element.opacity(props.opacity * element.props.opacity);
let half_width = width_of(&element) as f64 / 2.0;
draw_element(element, matrix, g, draw_state);
let x_trans = half_width + half_prev_width;
let Transform2D(new_matrix) = Transform2D(matrix)
.multiply(transform_2d::translation(x_trans * multi, 0.0));
matrix = new_matrix;
half_prev_width = half_width;
} I think the error that rustc should have given was
Perhaps the ICE is related to the way this error is detected, or perhaps the way the generic number's type is inferred? I tried recreating the ICE in a simpler playpen example to no avail. Hopefully this helps point someone in the right direction though! |
I can reproduce this error with the following test case (playpen): fn main() {
let _ = 0f32 * 0.0 * 0;
} The ICE also happens with the operators Adding or removing any type suffix, changing the operand order or using two different operators fixes the ICE. Version: Backtrace:
|
Duplicate of #24325 |
There is no subtyping relationship between the types (or their non-freshened variants), so they can not be merged. Fixes rust-lang#22645 Fixes rust-lang#24352 Fixes rust-lang#23825 Should fix rust-lang#25235 (no test in issue). Should fix rust-lang#19976 (test is outdated).
error: internal compiler error: Impl DefId { krate: 0, node: 12 }:u32.Stringify was matchable against Obligation(predicate=Binder(TraitPredicate(Stringify)),depth=0) but now is not
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with
RUST_BACKTRACE=1
for a backtraceMeta
rustc 1.0.0-nightly (199bdcf 2015-03-26) (built 2015-03-26)
binary: rustc
commit-hash: 199bdcf
commit-date: 2015-03-26
build-date: 2015-03-26
host: x86_64-apple-darwin
release: 1.0.0-nightly
The text was updated successfully, but these errors were encountered: