Skip to content

Compiler told me to file a bugreport #54120

Closed
@TheRustyStorm

Description

@TheRustyStorm

I tried to compile cgmath, at least this is where the problem happened.
I wanted to run my sideproject on my Arch linux
machine because it has more power.
Running cargo run --release failed

I tried this code:

I expected to see this happen: My code running

Instead, this happened:

[peter@Mothership:~/Raytracer][101]$ RUST_BACKTRACE=full cargo run --release --verbose
       Fresh adler32 v1.0.3
       Fresh byteorder v1.2.6
       Fresh libc v0.2.43
       Fresh bitflags v1.0.4
       Fresh rand_core v0.2.1
       Fresh approx v0.1.1
       Fresh inflate v0.4.3
       Fresh deflate v0.7.18
       Fresh rand v0.4.3
       Fresh rand v0.5.5
       Fresh num-traits v0.2.5
       Fresh num-integer v0.1.39
       Fresh num-traits v0.1.43
       Fresh num-iter v0.1.37
   Compiling cgmath v0.16.1
       Fresh png v0.12.0
     Running `rustc --crate-name cgmath /home/peter/.cargo/registry/src/github.com-1ecc6299db9ec823/cgmath-0.16.1/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=c12155b0943e0bc3 -C extra-filename=-c12155b0943e0bc3 --out-dir /home/peter/Raytracer/target/release/deps -L dependency=/home/peter/Raytracer/target/release/deps --extern rand=/home/peter/Raytracer/target/release/deps/librand-ff2b2669ff58c190.rlib --extern num_traits=/home/peter/Raytracer/target/release/deps/libnum_traits-a602f1eb9b6b81dd.rlib --extern approx=/home/peter/Raytracer/target/release/deps/libapprox-b202326fe5fe47a0.rlib --cap-lints allow`
thread 'rustc' panicked at 'assertion failed: `(left != right)`
  left: `ParamEnv(Binder(ProjectionPredicate(ProjectionTy { substs: Slice([S, S]), item_def_id: DefId(2/0:885 ~ core[ffe9]::ops[0]::arith[0]::Add[0]::Output[0]) }, S)))`,
 right: `ParamEnv(Binder(ProjectionPredicate(ProjectionTy { substs: Slice([S, S]), item_def_id: DefId(2/0:885 ~ core[ffe9]::ops[0]::arith[0]::Add[0]::Output[0]) }, S)))`', librustc/traits/project.rs:146:17
stack backtrace:
   0:     0x7f613e3cd083 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hc40e1d8049414718
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7f613e3c45c4 - std::sys_common::backtrace::_print::hf0e087caed6cb7b0
                               at libstd/sys_common/backtrace.rs:71
   2:     0x7f613e3c9d0d - std::panicking::default_hook::{{closure}}::h51b503c8121f2e1c
                               at libstd/sys_common/backtrace.rs:59
                               at libstd/panicking.rs:206
   3:     0x7f613e3c9a09 - std::panicking::default_hook::h92f8d7a75f029a40
                               at libstd/panicking.rs:222
   4:     0x7f613b00e8dd - core::ops::function::Fn::call::h6f1946f7b82ebda6
   5:     0x7f613e3ca1a9 - std::panicking::rust_panic_with_hook::hd9e2db57fe6c41ab
                               at libstd/panicking.rs:401
   6:     0x7f613e3c9f92 - std::panicking::begin_panic_fmt::he73ce2d8bf11fd27
                               at libstd/panicking.rs:347
   7:     0x7f613b3207e2 - rustc::traits::project::ProjectionTyCandidateSet::push_candidate::ha024fea861181222
   8:     0x7f613b324dd2 - rustc::traits::project::opt_normalize_projection_type::h02002e97c58b49f0
   9:     0x7f613b320d55 - rustc::traits::project::poly_project_and_unify_type::{{closure}}::hfffa2587c07747db
  10:     0x7f613b3208e6 - rustc::traits::project::poly_project_and_unify_type::h233c2d432e2c537d
  11:     0x7f613b31e2bd - <rustc::traits::fulfill::FulfillProcessor<'a, 'b, 'gcx, 'tcx> as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation::hf91ef4613e1100b7
  12:     0x7f613b31d17a - rustc::traits::fulfill::FulfillmentContext::select::h048a93d8424ffe94
  13:     0x7f613b31c1e6 - rustc::traits::fulfill::FulfillmentContext::select_all_or_error::hf71f8adbcbfd1cfe
  14:     0x7f613d23df5b - rustc_typeck::check::compare_method::compare_predicate_entailment::hb970a729314ef414
  15:     0x7f613d25b666 - rustc_typeck::check::check_impl_items_against_trait::he8195eca18bd3497
  16:     0x7f613d2552b6 - rustc_typeck::check::check_item_type::hef40d5b680e8d025
  17:     0x7f613d29e0bb - rustc_typeck::check_crate::{{closure}}::hca506e6aed2b1bff
  18:     0x7f613d2997ae - rustc_typeck::check_crate::ha126f305510d32a8
  19:     0x7f613e7164c9 - rustc::ty::context::TyCtxt::create_and_enter::hd9afe302f04a8060
  20:     0x7f613e77752e - rustc_driver::driver::compile_input::hf08ee19e2779d9bb
  21:     0x7f613e793c5a - rustc_driver::run_compiler::hb8a2a908a67aef0b
  22:     0x7f613e6bf6ea - std::sys_common::backtrace::__rust_begin_short_backtrace::hf2003ffe9c7c219d
  23:     0x7f613e3e2c6e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  24:     0x7f613e6f8936 - <F as alloc::boxed::FnBox<A>>::call_box::h6eec575c3921fe72
  25:     0x7f613e3da02b - std::sys::unix::thread::Thread::new::thread_start::h2d04eaf7b6bb3a88
                               at /checkout/src/liballoc/boxed.rs:793
                               at libstd/sys_common/thread.rs:24
                               at libstd/sys/unix/thread.rs:90
  26:     0x7f613988aa9c - start_thread
  27:     0x7f613e260a42 - clone
  28:                0x0 - <unknown>

error: internal compiler error: unexpected panic

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: rustc 1.26.0-nightly (322d7f7b9 2018-02-25) running on x86_64-unknown-linux-gnu

error: Could not compile `cgmath`.

Caused by:
  process didn't exit successfully: `rustc --crate-name cgmath /home/peter/.cargo/registry/src/github.com-1ecc6299db9ec823/cgmath-0.16.1/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=c12155b0943e0bc3 -C extra-filename=-c12155b0943e0bc3 --out-dir /home/peter/Raytracer/target/release/deps -L dependency=/home/peter/Raytracer/target/release/deps --extern rand=/home/peter/Raytracer/target/release/deps/librand-ff2b2669ff58c190.rlib --extern num_traits=/home/peter/Raytracer/target/release/deps/libnum_traits-a602f1eb9b6b81dd.rlib --extern approx=/home/peter/Raytracer/target/release/deps/libapprox-b202326fe5fe47a0.rlib --cap-lints allow` (exit code: 101)

Meta

rustc --version --verbose:
rustc 1.26.0-nightly (322d7f7 2018-02-25)
binary: rustc
commit-hash: 322d7f7
commit-date: 2018-02-25
host: x86_64-unknown-linux-gnu
release: 1.26.0-nightly
LLVM version: 6.0

Laptop is running on Intel i7, has a Geforce GTX 850m and is rocking Anarchy Linux

Backtrace:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions