-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Internal compiler error for summation of different numerical types. #25373
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
Comments
Contributing a backtrace using the OP's code in case it proves useful: Meta
Backtrace: stack backtrace: |
Fixed by #25344. |
Thanks @arielb1! |
Got an internal compiler error for a small simple program.
I tried this code:
fn minutes_to_hours(minutes:isize) -> (f32) {
let mut hours = minutes/60;
let mut decimal_hours = 0.0;
hours = hours +1;
hours + decimal_hours
}
fn main() {}
I expected to see this happen:
To get a compiler error message or a resulting compiled binary from the compiler.
Instead, this happened:
rustc internal_compiler_error.rs
error: internal compiler error: Impl DefId { krate: 2, node: 21469 } was matchable against Obligation(predicate=Binder(TraitPredicate(core::ops::Add<_>)),depth=1) 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 backtracethread 'rustc' panicked at 'Box', C:/bot/slave/beta-dist-rustc-win-64/build/src/libsyntax\diagnostic.rs:209
rustc --version --verbose
rustc 1.0.0-beta.5 (7b4ef47 2015-05-11) (built 2015-05-11)
binary: rustc
commit-hash: 7b4ef47
commit-date: 2015-05-11
build-date: 2015-05-11
host: x86_64-pc-windows-gnu
release: 1.0.0-beta.5
Backtrace:
This was on a windows pc and I did not manage to get a backtrace.
The text was updated successfully, but these errors were encountered: