Skip to content

rustc (nightly) unexpected panic on librustc_errors #58937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
editicalu opened this issue Mar 5, 2019 · 1 comment
Closed

rustc (nightly) unexpected panic on librustc_errors #58937

editicalu opened this issue Mar 5, 2019 · 1 comment

Comments

@editicalu
Copy link

Code

use nalgebra as na;
use na::base::MatrixN;

fn main() {
    let a: MatrixN<f64, 1000> = Matrix::zero();
    let b: MatrixN<f64, 1000> = Matrix::zero();
}

Backtrace

$ RUST_BACKTRACE=1 cargo run --verbose
       Fresh autocfg v0.1.2
       Fresh rand_core v0.4.0
       Fresh rawpointer v0.1.0
       Fresh libm v0.1.2
       Fresh rand_core v0.3.1
       Fresh rand_jitter v0.1.3
       Fresh libc v0.2.50
       Fresh matrixmultiply v0.2.2
       Fresh num-traits v0.2.6
       Fresh typenum v1.10.0
       Fresh rand_hc v0.1.0
       Fresh rand_isaac v0.1.1
       Fresh rand_xorshift v0.1.1
       Fresh rand_pcg v0.1.2
       Fresh rand_os v0.1.3
       Fresh num-complex v0.2.1
       Fresh approx v0.3.1
       Fresh rand_chacha v0.1.1
       Fresh generic-array v0.12.0
       Fresh alga v0.8.2
       Fresh rand v0.6.5
       Fresh nalgebra v0.17.2
   Compiling matrixmult v0.1.0 (/home/wardsegers/matrixmult)
     Running `rustc --edition=2018 --crate-name matrixmult src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7ba3d38049e999da -C extra-filename=-7ba3d38049e999da --out-dir /home/wardsegers/matrixmult/target/debug/deps -C incremental=/home/wardsegers/matrixmult/target/debug/incremental -L dependency=/home/wardsegers/matrixmult/target/debug/deps --extern nalgebra=/home/wardsegers/matrixmult/target/debug/deps/libnalgebra-dd81d53f99533f4a.rlib`
error[E0433]: failed to resolve: use of undeclared type or module `Matrix`
 --> src/main.rs:5:33
  |
5 |     let a: MatrixN<f64, 1000> = Matrix::zero();
  |                                 ^^^^^^ use of undeclared type or module `Matrix`

error[E0433]: failed to resolve: use of undeclared type or module `Matrix`
 --> src/main.rs:6:33
  |
6 |     let b: MatrixN<f64, 1000> = Matrix::zero();
  |                                 ^^^^^^ use of undeclared type or module `Matrix`

error[E0107]: wrong number of type arguments: expected 2, found 1
 --> src/main.rs:5:12
  |
5 |     let a: MatrixN<f64, 1000> = Matrix::zero();
  |            ^^^^^^^^^^^^^^^^^^ expected 2 type arguments

error[E0107]: wrong number of type arguments: expected 2, found 1
 --> src/main.rs:6:12
  |
6 |     let b: MatrixN<f64, 1000> = Matrix::zero();
  |            ^^^^^^^^^^^^^^^^^^ expected 2 type arguments

error: internal compiler error: src/librustc_typeck/collect.rs:1322: unexpected const parent in type_of_def_id(): Ty(type(MatrixN<f64, >))

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:620:9
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: rustc::ty::context::tls::with_context_opt
  11: rustc::ty::context::tls::with_opt
  12: rustc::util::bug::opt_span_bug_fmt
  13: rustc::util::bug::bug_fmt
  14: rustc_typeck::collect::type_of
  15: rustc::ty::query::__query_compute::type_of
  16: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::type_of<'tcx>>::compute
  17: rustc::dep_graph::graph::DepGraph::with_task_impl
  18: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  19: rustc::ty::context::GlobalCtxt::enter_local
  20: rustc_typeck::check::typeck_tables_of
  21: rustc::ty::query::__query_compute::typeck_tables_of
  22: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::typeck_tables_of<'tcx>>::compute
  23: rustc::dep_graph::graph::DepGraph::with_task_impl
  24: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  25: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::par_body_owners
  26: rustc_typeck::check::typeck_item_bodies
  27: rustc::ty::query::__query_compute::typeck_item_bodies
  28: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::typeck_item_bodies<'tcx>>::compute
  29: rustc::dep_graph::graph::DepGraph::with_task_impl
  30: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  31: rustc::util::common::time
  32: rustc_typeck::check_crate
  33: rustc_interface::passes::analysis
  34: rustc::ty::query::__query_compute::analysis
  35: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::analysis<'tcx>>::compute
  36: rustc::dep_graph::graph::DepGraph::with_task_impl
  37: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  38: <std::thread::local::LocalKey<T>>::with
  39: rustc::ty::context::TyCtxt::create_and_enter
  40: rustc_driver::driver::compile_input
  41: rustc_driver::run_compiler_with_pool
  42: <scoped_tls::ScopedKey<T>>::set
  43: rustc_driver::run_compiler
  44: syntax::with_globals
  45: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  46: <F as alloc::boxed::FnBox<A>>::call_box
  47: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/87a436377a7cddd1d4426c9604c48e0aa2ec0b11/src/liballoc/boxed.rs:759
             at src/libstd/sys_common/thread.rs:14
             at src/libstd/sys/unix/thread.rs:80
  48: start_thread
  49: clone
query stack during panic:
#0 [type_of] processing `main::{{constant}}`
#1 [typeck_tables_of] processing `main::{{constant}}`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 5 previous errors

Some errors occurred: E0107, E0433.
For more information about an error, try `rustc --explain E0107`.

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.35.0-nightly (87a436377 2019-03-03) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `matrixmult`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name matrixmult src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7ba3d38049e999da -C extra-filename=-7ba3d38049e999da --out-dir /home/wardsegers/matrixmult/target/debug/deps -C incremental=/home/wardsegers/matrixmult/target/debug/incremental -L dependency=/home/wardsegers/matrixmult/target/debug/deps --extern nalgebra=/home/wardsegers/matrixmult/target/debug/deps/libnalgebra-dd81d53f99533f4a.rlib` (exit code: 101)

System information

$ rustc -V
rustc 1.35.0-nightly (87a436377 2019-03-03)
$ cargo -V
cargo 1.34.0-nightly (5c6aa46e6 2019-02-22)
@editicalu editicalu changed the title rustc unexpected panic on librustc_errors rustc (nightly) unexpected panic on librustc_errors Mar 5, 2019
@jonas-schievink
Copy link
Contributor

Duplicate of #58811

@jonas-schievink jonas-schievink marked this as a duplicate of #58811 Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants