Skip to content

Instantly share code, notes, and snippets.

@MaikKlein
Created May 25, 2013 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaikKlein/5650864 to your computer and use it in GitHub Desktop.
Save MaikKlein/5650864 to your computer and use it in GitHub Desktop.
struct Vec3<T>{
mut x: T,
mut y: T,
mut z: T
}
impl<T: Add<T,T>+Clone> Vec3<T> {
fn add(&mut self,v: Vec3<T>){
self.x += v.x.clone();
self.y += v.y.clone();
self.z += v.z.clone();
}
}
fn main() {
let mut v1 : Vec3<int> = Vec3{x: 1,y: 1,z: 1,};
let v2 : Vec3<int> = Vec3{x: 1,y: 1,z: 1,};
v1.add(v2);
}
[maik@linux ~]$ RUST_LOG=rustc=1,::rt::backtrace rustc hello.rs
rust: task failed at 'assertion failed: !bcx.ccx().maps.moves_map.contains(&arg_expr.id)', /home/maik/rust1/src/librustc/middle/trans/callee.rs:744
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7ff54b128d1b]
/usr/local/bin/../lib/librustrt.so(+0x2a959)[0x7ff54b139959]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1a0)[0x7ff54b12ad80]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(_ZN3sys13begin_unwind_16_615cb041c655a976_07preE+0x1ad)[0x7ff54d0bdf4d]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x131d92)[0x7ff54d0bdd92]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(_ZN3sys14__extensions__9meth_95169fail_with17_ac9eb45dc42bd6906_07preE+0x6b)[0x7ff54cff8a3b]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans6callee14trans_arg_expr16_2fbbd31d48faf646_07preE+0x1ebe)[0x7ff54b557b5e]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans6callee10trans_args16_a78acc33bc5c1ee6_07preE+0x251)[0x7ff54b554701]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0x1f580d)[0x7ff54b55380d]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base10with_scope17_751aa43e51abdd296_07preE+0x59d)[0x7ff54b4ff39d]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans6callee16trans_call_inner17_eb90f7705c6b35fe6_07preE+0x13e)[0x7ff54b53a5fe]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0x216dd7)[0x7ff54b574dd7]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0x2109b2)[0x7ff54b56e9b2]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0x20c88a)[0x7ff54b56a88a]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4expr10trans_into17_e5614f2432997c506_07preE+0xb79)[0x7ff54b4ee569]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base10trans_stmt17_3ef1dacc677cd5d66_07preE+0x5eb)[0x7ff54b4ed1bb]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans11controlflow11trans_block15_b4a28808f840156_07preE+0x1a4)[0x7ff54b4ea8c4]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base13trans_closure17_3f5af2be3d6abd3d6_07preE+0xa41)[0x7ff54b61a131]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base8trans_fn17_15e13acb4667589b6_07preE+0x627)[0x7ff54b4a2637]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4meth12trans_method15_6575cb80fb07ff6_07preE+0x45e)[0x7ff54b4e207e]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans12monomorphize14monomorphic_fn16_88f2b985da2c13b6_07preE+0x5a15)[0x7ff54b4a85b5]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans6callee25trans_fn_ref_with_vtables16_298cdb48864112e6_07preE+0x1184)[0x7ff54b538ac4]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans6callee12trans_fn_ref17_5a4c2b139e64879f6_07preE+0x7e0)[0x7ff54b532e40]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4meth19trans_method_callee17_f9a2ddb867f9fd7f6_07preE+0x13c6)[0x7ff54b53df36]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0x1dd9aa)[0x7ff54b53b9aa]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0x1f527f)[0x7ff54b55327f]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base10with_scope17_751aa43e51abdd296_07preE+0x59d)[0x7ff54b4ff39d]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans6callee16trans_call_inner17_eb90f7705c6b35fe6_07preE+0x13e)[0x7ff54b53a5fe]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans6callee17trans_method_call17_d152486b449c2dac6_07preE+0x76d)[0x7ff54b53aeed]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0x207e8a)[0x7ff54b565e8a]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4expr10trans_into17_e5614f2432997c506_07preE+0x9b3)[0x7ff54b4ee3a3]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base10trans_stmt17_3ef1dacc677cd5d66_07preE+0x5eb)[0x7ff54b4ed1bb]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans11controlflow11trans_block15_b4a28808f840156_07preE+0x1a4)[0x7ff54b4ea8c4]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base13trans_closure17_3f5af2be3d6abd3d6_07preE+0xa41)[0x7ff54b61a131]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base8trans_fn17_15e13acb4667589b6_07preE+0x627)[0x7ff54b4a2637]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base10trans_item15_e67b684c22b39d6_07preE+0xd56)[0x7ff54b498b26]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base9trans_mod17_508c3eabe85ab39c6_07preE+0xb6)[0x7ff54b620886]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6middle5trans4base11trans_crate15_413e84cd6089ac6_07preE+0x34fe)[0x7ff54b63ecee]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6driver6driver12compile_rest16_555c6a2c97d242f6_07preE+0x3ba9)[0x7ff54bd34549]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6driver6driver12compile_upto17_84fd92d74f15f58a6_07preE+0x192)[0x7ff54bd38022]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6driver6driver13compile_input17_fce316696d8db2c56_07preE+0x107)[0x7ff54bd384a7]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN12run_compiler17_1bdc8d829cd3bdf46_07preE+0x2a7e)[0x7ff54bd674ee]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa27cbe)[0x7ff54bd85cbe]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa24cff)[0x7ff54bd82cff]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa1a20b)[0x7ff54bd7820b]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa27f98)[0x7ff54bd85f98]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0xf9ef5)[0x7ff54d085ef5]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x19088c)[0x7ff54d11c88c]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7ff54b1296c4]
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/maik/rust1/src/librustc/rustc.rc:351
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7ff54b128d1b]
/usr/local/bin/../lib/librustrt.so(+0x2a959)[0x7ff54b139959]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1a0)[0x7ff54b12ad80]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(_ZN3sys13begin_unwind_16_615cb041c655a976_07preE+0x1ad)[0x7ff54d0bdf4d]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x132332)[0x7ff54d0be332]
/home/maik/rust1/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x6ae94)[0x7ff54cff6e94]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN7monitor17_9b7abba5f0748dc16_07preE+0x5065)[0x7ff54bd6d755]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa27f98)[0x7ff54bd85f98]
/usr/local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN4main15_c4de63b748e03d6_07preE+0x69)[0x7ff54bd85bf9]
rustc(_rust_main+0x2e)[0x400c2e]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7ff54b1296c4]
rust: domain main @0x71a410 root task failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment