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: 'internal error: entered unreachable code', compiler/rustc_resolve/src/imports.rs:965:70 #83317

Closed
ghost opened this issue Mar 20, 2021 · 3 comments · Fixed by #83336
Closed
Assignees
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented Mar 20, 2021

Code

use clippy::a::b;

fn main() {}

Meta

Playground
Happens on stable and nightly.

rustc 1.50.0 (cb75ad5db 2021-02-10)
rustc 1.52.0-nightly (f5f33ec0e 2021-03-19)

Error output

Compiler crash

Backtrace

Compiling playground v0.0.1 (/playground)
thread 'rustc' panicked at 'internal error: entered unreachable code', compiler/rustc_resolve/src/imports.rs:958:70
stack backtrace:
   0: rust_begin_unwind
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:50:5
   3: rustc_resolve::imports::ImportResolver::finalize_import
   4: rustc_resolve::imports::ImportResolver::finalize_imports
   5: rustc_resolve::Resolver::resolve_crate
   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
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.50.0 (cb75ad5db 2021-02-10) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `playground`

To learn more, run the command again with --verbose.

@ghost ghost added C-bug Category: This is a bug. 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. labels Mar 20, 2021
@jonas-schievink jonas-schievink added A-resolve Area: Name/path resolution done by `rustc_resolve` specifically I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 20, 2021
@apiraino
Copy link
Contributor

This regression looks to be really old. Could not pinpoint a specific commit while bisecting

********************************************************************************
Regression in nightly-2018-11-20
********************************************************************************
found 6 bors merge commits in the specified range
  commit[0] 2018-11-18UTC: Auto merge of #56017 - alexcrichton:debug-test, r=alexcrichton
  commit[1] 2018-11-18UTC: Auto merge of #55672 - RalfJung:miri-extern-types, r=eddyb
  commit[2] 2018-11-19UTC: Auto merge of #56042 - petrochenkov:nuni, r=petrochenkov
  commit[3] 2018-11-19UTC: Auto merge of #56051 - pietroalbini:rollup, r=pietroalbini
  commit[4] 2018-11-19UTC: Auto merge of #56060 - nrc:save-path-fallback, r=zackmdavis
  commit[5] 2018-11-19UTC: Auto merge of #55971 - SergioBenitez:skip-non-semantic, r=alexcrichton
ERROR: no commits between 13c9439925797cd7a65c917d047c07a500d9bfe6 and 
5aff30734b0e1056b1003459fbb27af199f51822 within last 167 days

@jyn514
Copy link
Member

jyn514 commented Mar 20, 2021

@apiraino I don't think this is a regression, the --edition 2018 flag just didn't exist before 1.31 (the panic doesn't occur without --edition).

@camelid
Copy link
Member

camelid commented Mar 21, 2021

Assigning P-low and removing I-prioritize as discussed in the prioritization working group.

@rustbot label: +P-low -I-prioritize

@rustbot rustbot added P-low Low priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 21, 2021
@bors bors closed this as completed in ea5ba76 Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants