Last active
August 29, 2015 14:20
-
-
Save sharnik/3d1973950e6fb21640a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ RUST_BACKTRACE=1 rustc set_1.rs | |
set_1.rs:7:33: 7:36 error: mismatched types: | |
expected `u16`, | |
found `_` | |
(expected u16, | |
found floating-point variable) [E0308] | |
set_1.rs:7 let mut final_score : u16 = 0.0; | |
^~~ | |
error: internal compiler error: Impl DefId { krate: 2, node: 36957 } 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 backtrace | |
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:190 | |
stack backtrace: | |
1: 0x10ec74f77 - sys::backtrace::write::h799ab135045ca9ca1LC | |
2: 0x10eca2e4d - panicking::on_panic::h9502e488a92fc8bcHAI | |
3: 0x10ebc72de - rt::unwind::begin_unwind_inner::hf0537788ee16eadbiiI | |
4: 0x10e39d5ae - rt::unwind::begin_unwind::h447731439410619827 | |
5: 0x10e39ddf9 - diagnostic::Handler::bug::hb6bac6e14e70580aZsB | |
6: 0x10bec83be - middle::traits::select::SelectionContext<'cx, 'tcx>::rematch_impl::h00902254f92fe252QxT | |
7: 0x10bec7d08 - middle::infer::InferCtxt<'a, 'tcx>::commit_if_ok::h14474907185931287891 | |
8: 0x10bea8e94 - middle::traits::select::SelectionContext<'cx, 'tcx>::confirm_candidate::h3f1d070f70ab815cMPS | |
9: 0x10be7c9c6 - middle::traits::select::SelectionContext<'cx, 'tcx>::select::hc528f249f6251cb8OQQ | |
10: 0x10be8c98a - middle::traits::project::project_type::h7ca468ea33bc79f1AwP | |
11: 0x10be8a367 - middle::traits::project::opt_normalize_projection_type::h766518f8b1310230cpP | |
12: 0x10be83d86 - middle::traits::project::poly_project_and_unify_type::closure.83535 | |
13: 0x10be81bc0 - middle::traits::project::poly_project_and_unify_type::h44012951a95c13e5l5O | |
14: 0x10be79206 - middle::traits::fulfill::FulfillmentContext<'tcx>::select::h7d8cf023413c2180uHO | |
15: 0x10be78848 - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h0397a49aa695a23cIGO | |
16: 0x10b216433 - check::vtable::select_fcx_obligations_where_possible::h99330aa4e9f6a658d4b | |
17: 0x10b25048d - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::h7c8e59ec20a8f3b2qYo | |
18: 0x10b2cca3e - check::op::check_binop::h7e7f29a781258fb2u5m | |
19: 0x10b3103c3 - check::check_expr_with_unifier::h7970691808293538245 | |
20: 0x10b310c51 - check::check_expr_with_unifier::h7970691808293538245 | |
21: 0x10b2da9db - check::check_block_with_expected::h60bff5b1f9d55793fps | |
22: 0x10b31e1fc - check::check_expr_with_unifier::h3387119839630377047 | |
23: 0x10b205225 - check::_match::check_match::closure.28878 | |
24: 0x10b204f31 - check::_match::check_match::h16ffe88f8d46da5fVmb | |
25: 0x10b3109c9 - check::check_expr_with_unifier::h7970691808293538245 | |
26: 0x10b2da9db - check::check_block_with_expected::h60bff5b1f9d55793fps | |
27: 0x10b2f5454 - check::check_block_no_value::hd753e3d237263edfgos | |
28: 0x10b31e0f3 - check::check_expr_with_unifier::h3387119839630377047 | |
29: 0x10b205225 - check::_match::check_match::closure.28878 | |
30: 0x10b204f31 - check::_match::check_match::h16ffe88f8d46da5fVmb | |
31: 0x10b3109c9 - check::check_expr_with_unifier::h7970691808293538245 | |
32: 0x10b33aef2 - check::check_decl_local::h3120cc1034f52b749is | |
33: 0x10b2da6a1 - check::check_block_with_expected::h60bff5b1f9d55793fps | |
34: 0x10b32b8bc - check::check_expr_with_unifier::h6698900367440735538 | |
35: 0x10b2da705 - check::check_block_with_expected::h60bff5b1f9d55793fps | |
36: 0x10b2b6e05 - check::check_fn::h410d0ffafb47f675l1n | |
37: 0x10b2d532e - check::check_bare_fn::h05c77be534ada2cfUQn | |
38: 0x10b2ceee2 - check::check_item::h9d89bedf29e4fe82F9n | |
39: 0x10b3ab676 - check_crate::closure.36302 | |
40: 0x10b3a5ae7 - check_crate::h09aa7856a322fd44bwC | |
41: 0x10b0c4355 - driver::phase_3_run_analysis_passes::h1af60e7c926ca39dgGa | |
42: 0x10b0a8a85 - driver::compile_input::h27cf4320fd56e5cbQba | |
43: 0x10b166a15 - run_compiler::h93c68a2a3c26052bV4b | |
44: 0x10b1641e2 - boxed::F.FnBox<A>::call_box::h4498816167135712709 | |
45: 0x10b1636d7 - rt::unwind::try::try_fn::h2387014819904265058 | |
46: 0x10ed2cea8 - rust_try_inner | |
47: 0x10ed2ce95 - rust_try | |
48: 0x10b1639ca - boxed::F.FnBox<A>::call_box::h4850138824497903476 | |
49: 0x10ec8c37d - sys::thread::create::thread_start::h42d6d904fce5365aihH | |
50: 0x7fff927f6267 - _pthread_body | |
51: 0x7fff927f61e4 - _pthread_start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let mut result : [u16; 26] = [0; 26]; | |
let idx : u8 = 1; | |
result[idx as usize] = result[idx as usize ] + 1; | |
let mut scores = [0.0; 26]; | |
let mut final_score : u16 = 0.0; | |
for score in scores.iter() { final_score = final_score + *score }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment