Closed
Description
I have no idea where is the problem coming from, so I have no minimal example.
It happened with a Box2D binding I'm currently working on.
The binding is compiling fine but not the example:
[basta@manjaro rust_box2d]$ RUST_BACKTRACE=1 cargo test
unused manifest key: package.license
Compiling rust_box2d v0.2.0 (file:///home/basta/Projects/rust_box2d)
/home/basta/Projects/rust_box2d/examples/example.rs:5:10: 5:15 warning: unused import, #[warn(unused_imports)] on by default
/home/basta/Projects/rust_box2d/examples/example.rs:5 use b2::{Owned, Ref, RefMut};
^~~~~
/home/basta/Projects/rust_box2d/examples/example.rs:5:17: 5:20 warning: unused import, #[warn(unused_imports)] on by default
/home/basta/Projects/rust_box2d/examples/example.rs:5 use b2::{Owned, Ref, RefMut};
^~~
/home/basta/Projects/rust_box2d/examples/example.rs:5:22: 5:28 warning: unused import, #[warn(unused_imports)] on by default
/home/basta/Projects/rust_box2d/examples/example.rs:5 use b2::{Owned, Ref, RefMut};
^~~~~~
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'assertion failed: `(left == right) && (right == left)` (left: `11`, right: `0`)', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustc/middle/trans/base.rs:517
stack backtrace:
1: 0x7f2ce9982770 - rt::backtrace::imp::write::h8cd99dff1e402ef9UZq
2: 0x7f2ce9985920 - failure::on_fail::ha41409a33267b3c2Blr
3: 0x7f2cea150510 - unwind::begin_unwind_inner::h8c1fbf5424a0d801Zie
4: 0x7f2cea150210 - unwind::begin_unwind_fmt::h7d1a8b26e8f4f235pge
5: 0x7f2cea8f3bf0 - middle::trans::base::get_res_dtor::haffd43b5c98b1ff2fvb
6: 0x7f2cea8f38b0 - middle::trans::glue::trans_struct_drop::ha623b901491bd7beDVY
7: 0x7f2cea8f3840 - middle::trans::glue::trans_struct_drop_flag::closure.114447
8: 0x7f2cea8f3630 - middle::trans::base::with_cond::h5f39b86e2535fff7Bnc
9: 0x7f2cea8f1470 - middle::trans::glue::make_drop_glue::as_closure.114413
10: 0x7f2cea8f0450 - middle::trans::glue::make_generic_glue::h3252634c1ae5afcenoZ
11: 0x7f2cea8eeaf0 - middle::trans::glue::get_drop_glue::h8f3e6346e22e028dDLY
12: 0x7f2cea8ee9d0 - middle::trans::glue::drop_ty::haf109e2809857511hJY
13: 0x7f2cea9fe920 - middle::trans::cleanup::DropValue.Cleanup::trans::h59af69c9d899b958Fpw
14: 0x7f2cea9fc0f0 - middle::trans::cleanup::FunctionContext<'a>.CleanupHelperMethods<'a>::trans_cleanups_to_exit_scope::h0a28401680f9217b3Uv
15: 0x7f2cea9ffe80 - middle::trans::cleanup::FunctionContext<'a>.CleanupHelperMethods<'a>::get_or_create_landing_pad::h5f72f4eb3dad1f31Tbw
16: 0x7f2cea978720 - middle::trans::cleanup::FunctionContext<'a>.CleanupMethods<'a>::get_landing_pad::h915a0bc2fa152c11PHv
17: 0x7f2cea8f5430 - middle::trans::base::invoke::h835930d70a255d9bC2b
18: 0x7f2cea8e2410 - middle::trans::callee::trans_call_inner::hd5b053a59a029edbhZ0
19: 0x7f2cea924960 - middle::trans::expr::trans_overloaded_op::h2c12d4646782278f7O3
20: 0x7f2cea92ff20 - middle::trans::expr::deref_once::h89a80c5bee3ba998ih4
21: 0x7f2cea8da700 - middle::trans::expr::trans::h9fde924695247345yP1
22: 0x7f2cea90ffe0 - middle::trans::callee::trans_args::h94aa490682ec9488ek1
23: 0x7f2cea8e2410 - middle::trans::callee::trans_call_inner::hd5b053a59a029edbhZ0
24: 0x7f2cea90ab00 - middle::trans::callee::trans_method_call::h09857d1ff4ef116cvU0
25: 0x7f2cea9184f0 - middle::trans::expr::trans_rvalue_dps_unadjusted::hf838e4d6ac48b5a0gG2
26: 0x7f2cea8d8ff0 - middle::trans::expr::trans_into::h649653a95c0f1ba5CL1
27: 0x7f2cea9184f0 - middle::trans::expr::trans_rvalue_dps_unadjusted::hf838e4d6ac48b5a0gG2
28: 0x7f2cea917700 - middle::trans::expr::trans_unadjusted::hc3387fb48b9faca2781
29: 0x7f2cea8da700 - middle::trans::expr::trans::h9fde924695247345yP1
30: 0x7f2cea8d8eb0 - middle::trans::expr::trans_to_lvalue::h275612bee7c33b29971
31: 0x7f2cea922c80 - middle::trans::expr::trans_addr_of::hb328313e7153cbaa6w3
32: 0x7f2cea917700 - middle::trans::expr::trans_unadjusted::hc3387fb48b9faca2781
33: 0x7f2cea8d8ff0 - middle::trans::expr::trans_into::h649653a95c0f1ba5CL1
34: 0x7f2cea92b310 - middle::trans::expr::trans_adt::hda12d7a3d0f04bafBg3
35: 0x7f2cea9184f0 - middle::trans::expr::trans_rvalue_dps_unadjusted::hf838e4d6ac48b5a0gG2
36: 0x7f2cea917700 - middle::trans::expr::trans_unadjusted::hc3387fb48b9faca2781
37: 0x7f2cea8da700 - middle::trans::expr::trans::h9fde924695247345yP1
38: 0x7f2cea8d8eb0 - middle::trans::expr::trans_to_lvalue::h275612bee7c33b29971
39: 0x7f2cea9299d0 - middle::trans::_match::trans_match::h288aefea821abbe87tg
40: 0x7f2cea9184f0 - middle::trans::expr::trans_rvalue_dps_unadjusted::hf838e4d6ac48b5a0gG2
41: 0x7f2cea8d8ff0 - middle::trans::expr::trans_into::h649653a95c0f1ba5CL1
42: 0x7f2cea8d9580 - middle::trans::controlflow::trans_block::h64bf3c764c6ae1b0g4X
43: 0x7f2cea9184f0 - middle::trans::expr::trans_rvalue_dps_unadjusted::hf838e4d6ac48b5a0gG2
44: 0x7f2cea8d8ff0 - middle::trans::expr::trans_into::h649653a95c0f1ba5CL1
45: 0x7f2cea8d84f0 - middle::trans::controlflow::trans_stmt_semi::ha1fb99ce3edb0c48m3X
46: 0x7f2cea8d7c20 - middle::trans::controlflow::trans_stmt::h2f04ce0d083156615YX
47: 0x7f2cea8d9580 - middle::trans::controlflow::trans_block::h64bf3c764c6ae1b0g4X
48: 0x7f2cea981580 - middle::trans::base::trans_closure::h98df0502771bceb0Pcd
49: 0x7f2cea8cad10 - middle::trans::base::trans_fn::h9827ee2f1991a21dCod
50: 0x7f2cea8c6300 - middle::trans::base::trans_item::h6eac98275cebe034CGd
51: 0x7f2cea98bc10 - middle::trans::base::trans_crate::h5cb30c85f982b3b7cBe
52: 0x7f2cead51570 - driver::driver::phase_4_translate_to_llvm::h7a29ae2a079bac6cf6w
53: 0x7f2cead48850 - driver::driver::compile_input::h4c4e2d8a00ea2981GIw
54: 0x7f2ceaddc920 - driver::run_compiler::h5959ab20bfeb7861zfA
55: 0x7f2ceaddc830 - driver::main_args::closure.137251
56: 0x7f2ceadee700 - task::TaskBuilder<S>::try_future::closure.138371
57: 0x7f2ceadee500 - task::TaskBuilder<S>::spawn_internal::closure.138348
58: 0x7f2ceb8125f0 - task::spawn_opts::closure.8365
59: 0x7f2cea1a8a90 - rust_try_inner
60: 0x7f2cea1a8a80 - rust_try
61: 0x7f2cea14db80 - unwind::try::hcf2c1555445335c8f7d
62: 0x7f2cea14d920 - task::Task::run::h03e40729a1df1ac2zdd
63: 0x7f2ceb8123b0 - task::spawn_opts::closure.8311
64: 0x7f2cea14f760 - thread::thread_start::h194d23d584ee3229lCd
65: 0x7f2ce941a060 - start_thread
66: 0x7f2ce9e1d489 - __clone
67: 0x0 - <unknown>
Could not compile `rust_box2d`.
To learn more, run the command again with --verbose.
The source code is here.
The library code is in the same repository.
The only hint I have is that my previous version doesn't have this problem.
The main thing I changed between those versions is that instead of using T
, TPtr<'l>
and TMutPtr<'l>
objects I introduced Owned<T>
, Ref<'l, T>
and RefMut<'l, T>
objects. So probably the problem is related to these objects, which code is located at the library main file.
Edit: the project is now hosted on https://github.com/Bastacyclop/rust_box2d