Skip to content

nalgebra generates tens of "bad constant user type" errors #55210

Closed
@ray-kast

Description

@ray-kast

I get the feeling this bug is a duplicate of something, but several Google searches yielded no relevant results, so my apologies if this has already been documented.

After I updated my Rust toolchain to version 1.31.0-nightly, building nalgebra as a dependency generates about seventy or so broken MIR errors, all of the form "bad constant user type."

The bug shows up as long as nalgebra is listed as a dependency:

Cargo.toml

[package]
name = "test"
version = "0.1.0"

[dependencies]
nalgebra = "0.16.5"

Meta

$ rustc --version --verbose
rustc 1.31.0-nightly (e7f5d4805 2018-10-18)
binary: rustc
commit-hash: e7f5d48059aa14cc2808473564deadd72d1e818d
commit-date: 2018-10-18
host: x86_64-unknown-linux-gnu
release: 1.31.0-nightly
LLVM version: 8.0

Full output of cargo build: https://pastebin.com/guth8P09

Compiler backtrace:

thread 'main' panicked at 'no errors encountered even though `delay_span_bug` issued', librustc_errors/lib.rs:334:17
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:480
   6: std::panicking::begin_panic
   7: <rustc_errors::Handler as core::ops::drop::Drop>::drop
   8: core::ptr::drop_in_place
   9: core::ptr::drop_in_place
  10: core::ptr::drop_in_place
  11: <scoped_tls::ScopedKey<T>>::set
  12: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  13: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  14: rustc_driver::run
  15: rustc_driver::main
  16: std::rt::lang_start::{{closure}}
  17: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  18: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  19: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  20: main
  21: __libc_start_main
  22: <unknown>
query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions