Skip to content
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

ICE when trying to execute a turbofish method of an error value #44814

Closed
kennytm opened this issue Sep 24, 2017 · 4 comments
Closed

ICE when trying to execute a turbofish method of an error value #44814

kennytm opened this issue Sep 24, 2017 · 4 comments
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@kennytm
Copy link
Member

kennytm commented Sep 24, 2017

Repro:

fn main() {
    please.crash::<u8>();
}

This crashes on 1.22+ (no repro on 1.21 or below):

error[E0425]: cannot find value `please` in this scope
 --> 1.rs:2:5
  |
2 |     please.crash::<u8>();
  |     ^^^^^^ not found in this scope

error: internal compiler error: src/librustc_typeck/check/mod.rs:2015: no type for node 7: type u8 (id=7) in fcx 0x70000b83c4a8

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.22.0-nightly (26015da01 2017-09-23) running on x86_64-apple-darwin

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

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:492:8
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_errors::Handler::bug
   7: rustc::session::opt_span_bug_fmt::{{closure}}
   8: rustc::session::opt_span_bug_fmt
   9: rustc::session::bug_fmt
  10: rustc_typeck::check::FnCtxt::node_ty
  11: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
  12: rustc::hir::intravisit::walk_path_parameters
  13: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  14: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_block
  15: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  16: rustc_typeck::check::typeck_tables_of::{{closure}}
  17: rustc_typeck::check::typeck_tables_of
  18: rustc::dep_graph::graph::DepGraph::with_task
  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::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  22: rustc_typeck::check::typeck_item_bodies
  23: rustc::dep_graph::graph::DepGraph::with_task
  24: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  25: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  26: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  27: rustc_typeck::check_crate
  28: rustc::ty::context::TyCtxt::create_and_enter
  29: rustc_driver::driver::compile_input
  30: rustc_driver::run_compiler

@kennytm
Copy link
Member Author

kennytm commented Sep 24, 2017

cc @petrochenkov WritebackCx::visit_ty was added in #44633.

@arielb1 arielb1 added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Sep 24, 2017
@TimNN TimNN added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 26, 2017
@nikomatsakis
Copy link
Contributor

triage: P-high

Assigning to @petrochenkov as this is believed to be due to #44633.

@nikomatsakis
Copy link
Contributor

@petrochenkov -- let us know if you don't have time to tackle this right now!

@petrochenkov
Copy link
Contributor

@nikomatsakis
I'm on vacation until Oct. 5
I occasionally have access to an old PC, but I'm not sure it will be able to build rustc, I'll try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants