Skip to content

unexpected compiler panic in cast.rs #46365

Description

@avadacatavra

Not totally sure why this happened. When I forgot an extern crate the compiler panicked with the following backtrace

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.23.0-nightly (e21df8020 2017-11-13) running on x86_64-apple-darwin

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'explicit panic', src/librustc_typeck/check/cast.rs:110:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: rustc_typeck::check::cast::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::pointer_kind
   7: rustc_typeck::check::cast::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::pointer_kind
   8: rustc_typeck::check::cast::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::pointer_kind
   9: rustc_typeck::check::cast::CastCheck::check
  10: rustc_typeck::check::FnCtxt::check_casts
  11: <std::thread::local::LocalKey<T>>::with
  12: rustc::ty::context::GlobalCtxt::enter_local
  13: _ZN12rustc_typeck5check16typeck_tables_of17h2991cb3aa7f93926E.llvm.5BE90B30
  14: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  15: _ZN5rustc9dep_graph5graph8DepGraph14with_task_impl17hdc0895b856803ac5E.llvm.E968ED05
  16: rustc_errors::Handler::track_diagnostics
  17: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  18: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  19: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  20: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  21: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure
  22: rustc::session::Session::track_errors
  23: _ZN12rustc_typeck5check18typeck_item_bodies17h619021d8d31ccdb0E.llvm.5BE90B30
  24: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::compute_result
  25: _ZN5rustc9dep_graph5graph8DepGraph14with_task_impl17h09adb0a33cf7a8d7E.llvm.E968ED05
  26: rustc_errors::Handler::track_diagnostics
  27: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  28: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force
  29: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  30: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  31: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  32: rustc_typeck::check_crate
  33: <std::thread::local::LocalKey<T>>::with
  34: <std::thread::local::LocalKey<T>>::with
  35: rustc::ty::context::TyCtxt::create_and_enter
  36: rustc_driver::driver::compile_input
  37: rustc_driver::run_compiler

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions