Skip to content

error: internal compiler error: src/librustc_typeck/check/mod.rs:2406: no type for node #57924

@tbarrella

Description

@tbarrella

May be related to #47713

I tried this code: Compiling the project here, but at this line replacing Gcm with Self

I expected to see this happen: Code compiles or gives error messages

Instead, this happened: Compiler panicked with stack trace below

Meta

rustc --version --verbose:

rustc 1.32.0 (9fda7c223 2019-01-16) binary: rustc commit-hash: 9fda7c2237db910e41d6a712e9a2139b352e558b commit-date: 2019-01-16 host: x86_64-apple-darwin release: 1.32.0 LLVM version: 8.0 

Backtrace:

> RUST_BACKTRACE=1 cargo build Compiling crypto-pure v0.0.9 (.../crypto-pure) error: internal compiler error: src/librustc_typeck/check/mod.rs:2406: no type for node 30873: type E (id=30873) in fcx 0x7ffee86dd208 thread 'main' panicked at 'Box<Any>', src/librustc_errors/lib.rs:600:9 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::_print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: rustc::util::common::panic_hook 5: std::panicking::rust_panic_with_hook 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::check::FnCtxt::node_ty 15: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty 16: rustc::hir::intravisit::walk_qpath 17: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr 18: rustc::hir::intravisit::walk_expr 19: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr 20: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr 21: rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body 22: rustc::ty::context::tls::with_related_context 23: rustc::infer::InferCtxtBuilder::enter 24: rustc_typeck::check::typeck_tables_of 25: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::typeck_tables_of<'tcx>>::compute 26: rustc::ty::context::tls::with_context 27: rustc::dep_graph::graph::DepGraph::with_task_impl 28: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start 29: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job 30: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query 31: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::ensure_query 32: rustc::session::Session::track_errors 33: rustc_typeck::check::typeck_item_bodies 34: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::typeck_item_bodies<'tcx>>::compute 35: rustc::ty::context::tls::with_context 36: rustc::dep_graph::graph::DepGraph::with_task_impl 37: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start 38: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job 39: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query 40: rustc::util::common::time 41: rustc_typeck::check_crate 42: rustc::ty::context::tls::enter_context 43: <std::thread::local::LocalKey<T>>::with 44: rustc::ty::context::TyCtxt::create_and_enter 45: rustc_driver::driver::compile_input 46: rustc_driver::run_compiler_with_pool 47: <scoped_tls::ScopedKey<T>>::set 48: rustc_driver::run_compiler 49: rustc_driver::monitor::{{closure}} 50: __rust_maybe_catch_panic 51: rustc_driver::run 52: rustc_driver::main 53: std::rt::lang_start::{{closure}} 54: std::panicking::try::do_call 55: __rust_maybe_catch_panic 56: std::rt::lang_start_internal 57: main query stack during panic: #0 [typeck_tables_of] processing `<gcm::Gcm<E> as gcm::AeadCipher>::new` #1 [typeck_item_bodies] type-checking all item bodies end of query stack error: aborting due to previous error 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.32.0 (9fda7c223 2019-01-16) running on x86_64-apple-darwin note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib note: some of the compiler flags provided by cargo are hidden error: Could not compile `crypto-pure`. To learn more, run the command again with --verbose. 

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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions