Skip to content

ICE: 'expected NodeId to be lowered already for res Local #82866

Closed
@chengniansun

Description

@chengniansun

Code

fn main () {
  match x {
    Some :: <v<>>(v)  => ()
  }
}

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (51748a8fc 2021-03-05)
binary: rustc
commit-hash: 51748a8fc77283914d4135f31b5966a407208187
commit-date: 2021-03-05
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

error[E0425]: cannot find value `x` in this scope
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:9
  |
2 |   match x {
  |         ^ not found in this scope

error[E0573]: expected type, found local variable `v`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:14
  |
3 |     Some :: <v<>>(v)  => ()
  |              ^^^ not a type

thread 'rustc' panicked at 'expected `NodeId` to be lowered already for res Local(
    NodeId(20),
)', compiler/rustc_ast_lowering/src/lib.rs:715:17
note: run with `RUST_BACKTRACE=1` environment variable to display a 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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (51748a8fc 2021-03-05) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0425, E0573.
For more information about an error, try `rustc --explain E0425`.
Backtrace

error[E0425]: cannot find value `x` in this scope
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:9
  |
2 |   match x {
  |         ^ not found in this scope

error[E0573]: expected type, found local variable `v`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:14
  |
3 |     Some :: <v<>>(v)  => ()
  |              ^^^ not a type

thread 'rustc' panicked at 'expected `NodeId` to be lowered already for res Local(
    NodeId(20),
)', compiler/rustc_ast_lowering/src/lib.rs:715:17
stack backtrace:
   0: rust_begin_unwind
             at /rustc/51748a8fc77283914d4135f31b5966a407208187/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/51748a8fc77283914d4135f31b5966a407208187/library/std/src/panicking.rs:435:5
   2: rustc_ast_lowering::LoweringContext::lower_node_id_generic
   3: rustc_ast_lowering::path::<impl rustc_ast_lowering::LoweringContext>::lower_path_segment
   4: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
   5: rustc_ast_lowering::path::<impl rustc_ast_lowering::LoweringContext>::lower_qpath
   6: rustc_ast_lowering::LoweringContext::lower_ty_direct
   7: rustc_ast_lowering::LoweringContext::lower_generic_arg
   8: <smallvec::SmallVec<A> as core::iter::traits::collect::Extend<<A as smallvec::Array>::Item>>::extend
   9: rustc_ast_lowering::path::<impl rustc_ast_lowering::LoweringContext>::lower_angle_bracketed_parameter_data
  10: rustc_ast_lowering::path::<impl rustc_ast_lowering::LoweringContext>::lower_path_segment
  11: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
  12: rustc_ast_lowering::path::<impl rustc_ast_lowering::LoweringContext>::lower_qpath
  13: rustc_ast_lowering::pat::<impl rustc_ast_lowering::LoweringContext>::lower_pat::{{closure}}
  14: rustc_ast_lowering::expr::<impl rustc_ast_lowering::LoweringContext>::lower_arm
  15: rustc_ast_lowering::Arena::alloc_from_iter
  16: rustc_ast_lowering::expr::<impl rustc_ast_lowering::LoweringContext>::lower_expr_mut::{{closure}}
  17: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  18: <core::iter::adapters::flatten::Flatten<I> as core::iter::traits::iterator::Iterator>::next
  19: <smallvec::SmallVec<A> as core::iter::traits::collect::Extend<<A as smallvec::Array>::Item>>::extend
  20: rustc_arena::cold_path
  21: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_fn_body_block
  22: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_item
  23: rustc_ast_lowering::LoweringContext::with_hir_id_owner
  24: rustc_ast_lowering::lower_crate
  25: rustc_interface::passes::BoxedResolver::access::{{closure}}
  26: rustc_interface::passes::configure_and_expand::{{closure}}
  27: rustc_interface::passes::BoxedResolver::access
  28: rustc_interface::queries::Queries::lower_to_hir
  29: rustc_interface::queries::Queries::global_ctxt
  30: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  31: rustc_span::with_source_map
  32: rustc_interface::interface::create_compiler_and_run
  33: rustc_span::with_session_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (51748a8fc 2021-03-05) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0425, E0573.
For more information about an error, try `rustc --explain E0425`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.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.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions