Skip to content

ICE: panicked at 'expected statement', compiler/rustc_expand/src/base.rs:201:18 #83469

Closed

Description

Code

fn outer() {
    #[global_allocator]
    fn inner() {}
}

Meta

rustc --version --verbose:

rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

error: allocators must be statics
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:5
  |
3 |     fn inner() {}
  |     ^^^^^^^^^^^^^

thread 'rustc' panicked at 'expected statement', compiler/rustc_expand/src/base.rs:201:18
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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu

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

error: allocators must be statics
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:5
  |
3 |     fn inner() {}
  |     ^^^^^^^^^^^^^

thread 'rustc' panicked at 'expected statement', compiler/rustc_expand/src/base.rs:201:18
stack backtrace:
   0: std::panicking::begin_panic
   1: <smallvec::SmallVec<A> as core::iter::traits::collect::Extend<<A as smallvec::Array>::Item>>::extend
   2: rustc_expand::expand::AstFragmentKind::expect_from_annotatables
   3: rustc_expand::expand::MacroExpander::fully_expand_fragment
   4: rustc_expand::expand::MacroExpander::expand_crate
   5: rustc_session::utils::<impl rustc_session::session::Session>::time
   6: rustc_interface::passes::configure_and_expand_inner
   7: rustc_interface::passes::configure_and_expand::{{closure}}
   8: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
   9: rustc_interface::passes::configure_and_expand
  10: rustc_interface::queries::Queries::expansion
  11: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  12: rustc_span::with_source_map
  13: rustc_interface::interface::create_compiler_and_run
  14: scoped_tls::ScopedKey<T>::set
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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

C-bugCategory: This is a bug.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