Skip to content

ICE: compiler/rustc_incremental/src/assert_dep_graph.rs:109:21: unexpected meta-item MetaItem #83175

Closed
@chengniansun

Description

@chengniansun

Code

#![feature(rustc_attrs)]
#[rustc_then_this_would_need(rustc_then_this_would_need())]
fn function() {}

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (d6eaea1c8 2021-03-14)
binary: rustc
commit-hash: d6eaea1c8860adb5302d2fbaad409e36585ab217
commit-date: 2021-03-14
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

warning: function is never used: `function`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:4
  |
3 | fn function() {}
  |    ^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

error: internal compiler error: compiler/rustc_incremental/src/assert_dep_graph.rs:109:21: unexpected meta-item MetaItem(MetaItem { path: Path { span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:30: 2:56 (#0), segments: [PathSegment { ident: rustc_then_this_would_need#0, id: NodeId(4294967040), args: None }], tokens: None }, kind: List([]), span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:30: 2:58 (#0) })
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:30
  |
2 | #[rustc_then_this_would_need(rustc_then_this_would_need())]
  |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

thread 'rustc' panicked at 'Box<Any>', /rustc/d6eaea1c8860adb5302d2fbaad409e36585ab217/library/std/src/panic.rs:59:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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 (d6eaea1c8 2021-03-14) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
end of query stack
error: aborting due to previous error; 1 warning emitted
Backtrace

warning: function is never used: `function`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:4
  |
3 | fn function() {}
  |    ^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

error: internal compiler error: compiler/rustc_incremental/src/assert_dep_graph.rs:109:21: unexpected meta-item MetaItem(MetaItem { path: Path { span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:30: 2:56 (#0), segments: [PathSegment { ident: rustc_then_this_would_need#0, id: NodeId(4294967040), args: None }], tokens: None }, kind: List([]), span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:30: 2:58 (#0) })
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:30
  |
2 | #[rustc_then_this_would_need(rustc_then_this_would_need())]
  |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

thread 'rustc' panicked at 'Box<Any>', /rustc/d6eaea1c8860adb5302d2fbaad409e36585ab217/library/std/src/panic.rs:59:5
stack backtrace:
   0: std::panicking::begin_panic
   1: std::panic::panic_any
   2: rustc_errors::HandlerInner::span_bug
   3: rustc_errors::Handler::span_bug
   4: rustc_middle::ty::context::tls::with_opt
   5: rustc_middle::util::bug::opt_span_bug_fmt
   6: rustc_middle::util::bug::span_bug_fmt
   7: rustc_incremental::assert_dep_graph::IfThisChanged::argument
   8: rustc_incremental::assert_dep_graph::IfThisChanged::process_attrs
   9: rustc_hir::hir::Crate::visit_all_item_likes
  10: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  11: rustc_incremental::assert_dep_graph::assert_dep_graph
  12: rustc_interface::passes::QueryContext::enter
  13: rustc_interface::queries::Queries::ongoing_codegen
  14: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  15: rustc_span::with_source_map
  16: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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 (d6eaea1c8 2021-03-14) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
end of query stack
error: aborting due to previous error; 1 warning emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustI-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.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions