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: no type for node #47713

Closed
Marwes opened this issue Jan 24, 2018 · 2 comments
Closed

ICE: no type for node #47713

Marwes opened this issue Jan 24, 2018 · 2 comments
Labels
A-type-system Area: Type system C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. 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.

Comments

@Marwes
Copy link
Contributor

Marwes commented Jan 24, 2018

Getting an ice when declaring a type with type parameters Abc<_> which should not have any. Though I have pruned away quite a lot of code I have unfortunately only been able to reproduce this when this is defined inside a (rather complicated) macro from an external crate but hopefully it should still be helpful.

Reproduction at https://github.com/Marwes/ice

Seems similiar to #44957

rustc 1.25.0-nightly (0f9c78475 2018-01-17)
binary: rustc
commit-hash: 0f9c784751434c70ddd6719ccda6817c819126f9
commit-date: 2018-01-17
host: x86_64-apple-darwin
release: 1.25.0-nightly
LLVM version: 4.0
error[E0244]: wrong number of type arguments: expected 0, found 1
  --> src/lib.rs:38:36
   |
38 |         many(value()).map(|result: ResultExtend<_>| {
   |                                    ^^^^^^^^^^^^^^^ expected no type arguments

error[E0244]: wrong number of type arguments: expected 0, found 1
  --> src/lib.rs:38:36
   |
38 |         many(value()).map(|result: ResultExtend<_>| {
   |                                    ^^^^^^^^^^^^^^^ expected no type arguments

error: internal compiler error: librustc_typeck/check/mod.rs:1996: no type for node 282: type _ (id=282) in fcx 0x70000a173128

error: internal compiler error: librustc_typeck/check/mod.rs:1996: no type for node 282: type _ (id=282) in fcx 0x70000c9a9128

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.25.0-nightly (0f9c78475 2018-01-17) running on x86_64-apple-darwin

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

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:509:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::bug
   7: <std::thread::local::LocalKey<T>>::with
   8: rustc::ty::context::tls::with_opt
   9: rustc::session::opt_span_bug_fmt
  10: rustc::session::bug_fmt
  11: rustc_typeck::check::FnCtxt::node_ty
  12: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
  13: rustc::hir::intravisit::walk_path
  14: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
  15: rustc::hir::intravisit::walk_fn
  16: rustc::hir::intravisit::walk_expr
  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_local
  21: rustc::hir::intravisit::walk_expr
  22: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  23: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  24: rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body
  25: <std::thread::local::LocalKey<T>>::with
  26: rustc::infer::InferCtxtBuilder::enter
  27: rustc_typeck::check::typeck_tables_of
  28: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  29: rustc::dep_graph::graph::DepGraph::with_task_impl
  30: rustc_errors::Handler::track_diagnostics
  31: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  32: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  33: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  34: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  35: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  36: rustc_typeck::check::typeck_tables_of
  37: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  38: rustc::dep_graph::graph::DepGraph::with_task_impl
  39: rustc_errors::Handler::track_diagnostics
  40: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  41: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  42: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  43: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  44: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure
  45: rustc_typeck::check::typeck_item_bodies
  46: rustc::dep_graph::graph::DepGraph::with_task_impl
  47: rustc_errors::Handler::track_diagnostics
  48: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  49: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force
  50: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  51: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  52: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  53: rustc_typeck::check_crate
  54: <std::thread::local::LocalKey<T>>::with
  55: <std::thread::local::LocalKey<T>>::with
  56: rustc::ty::context::TyCtxt::create_and_enter
  57: rustc_driver::driver::compile_input
  58: rustc_driver::run_compiler

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.25.0-nightly (0f9c78475 2018-01-17) running on x86_64-apple-darwin

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

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:509:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::bug
   7: <std::thread::local::LocalKey<T>>::with
   8: rustc::ty::context::tls::with_opt
   9: rustc::session::opt_span_bug_fmt
  10: rustc::session::bug_fmt
  11: rustc_typeck::check::FnCtxt::node_ty
  12: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
  13: rustc::hir::intravisit::walk_path
  14: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
  15: rustc::hir::intravisit::walk_fn
  16: rustc::hir::intravisit::walk_expr
  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_local
  21: rustc::hir::intravisit::walk_expr
  22: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  23: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  24: rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body
  25: <std::thread::local::LocalKey<T>>::with
  26: rustc::infer::InferCtxtBuilder::enter
  27: rustc_typeck::check::typeck_tables_of
  28: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  29: rustc::dep_graph::graph::DepGraph::with_task_impl
  30: rustc_errors::Handler::track_diagnostics
  31: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  32: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  33: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  34: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  35: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  36: rustc_typeck::check::typeck_tables_of
  37: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  38: rustc::dep_graph::graph::DepGraph::with_task_impl
  39: rustc_errors::Handler::track_diagnostics
  40: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  41: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  42: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  43: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  44: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure
  45: rustc_typeck::check::typeck_item_bodies
  46: rustc::dep_graph::graph::DepGraph::with_task_impl
  47: rustc_errors::Handler::track_diagnostics
  48: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  49: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force
  50: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  51: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  52: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  53: rustc_typeck::check_crate
  54: <std::thread::local::LocalKey<T>>::with
  55: <std::thread::local::LocalKey<T>>::with
  56: rustc::ty::context::TyCtxt::create_and_enter
  57: rustc_driver::driver::compile_input
  58: rustc_driver::run_compiler

error: Could not compile `ice`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `ice`.

@estebank estebank added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 24, 2018
@cuviper cuviper added A-type-system Area: Type system T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jan 27, 2018
@estebank
Copy link
Contributor

Can't repro as https://github.com/Marwes/combine/tree/partial_parsing no longer exists.

@estebank estebank added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Jun 22, 2018
@estebank
Copy link
Contributor

Closing as it seems similar to #53498 which has been fixed and this has no repro case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. 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.
Projects
None yet
Development

No branches or pull requests

3 participants