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: 'compiler/rustc_interface/src/interface.rs:181:45: shoudn't be possible' #111291

Closed
taiki-e opened this issue May 6, 2023 · 1 comment · Fixed by #111292
Closed

ICE: 'compiler/rustc_interface/src/interface.rs:181:45: shoudn't be possible' #111291

taiki-e opened this issue May 6, 2023 · 1 comment · Fixed by #111292
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@taiki-e
Copy link
Member

taiki-e commented May 6, 2023

Code

// src/lib.rs
// (can be reproduced with an empty crate)

Run RUSTFLAGS='-Z unstable-options --check-cfg=names(a) --check-cfg=values(a,"b")' cargo build

It works if the order of --check-cfg=names and -check-cfg=values is swapped. (e.i., RUSTFLAGS='-Z unstable-options --check-cfg=values(a,"b") --check-cfg=names(a)' cargo build)

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (f9a6b7158 2023-05-05)
binary: rustc
commit-hash: f9a6b71580cd53dd4491d9bb6400f7ee841d9c22
commit-date: 2023-05-05
host: aarch64-apple-darwin
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/Users/taiki/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc - --crate-name ___ --print=file-names -Z unstable-options '--check-cfg=names(a)' '--check-cfg=values(a,"b")' --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'compiler/rustc_interface/src/interface.rs:181:45: shoudn't be possible', compiler/rustc_middle/src/util/bug.rs:36:26
  stack backtrace:
     0: std::panicking::begin_panic::<alloc::string::String>
     1: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
     2: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
     3: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
     4: rustc_middle::util::bug::bug_fmt
     5: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::with::<rustc_interface::interface::parse_check_cfg::{closure#0}, rustc_session::config::CheckCfg>
     6: rustc_interface::interface::parse_check_cfg
     7: <rustc_driver_impl::RunCompiler>::run
     8: <core::panic::unwind_safe::AssertUnwindSafe<rustc_driver_impl::main::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
     9: rustc_driver_impl::main
    10: rustc_main::main
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  error: 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.71.0-nightly (f9a6b7158 2023-05-05) running on aarch64-apple-darwin

  note: compiler flags: -Z unstable-options --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro

  query stack during panic:
  end of query stack

The backtrace points to the line added in #111068.
cc @Urgau


@rustbot label +requires-nightly

@taiki-e taiki-e 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 May 6, 2023
@rustbot rustbot added the requires-nightly This issue requires a nightly compiler in some way. label May 6, 2023
@Urgau
Copy link
Member

Urgau commented May 6, 2023

Sorry about that. Will fix it.

@rustbot claim

taiki-e added a commit to taiki-e/atomic-maybe-uninit that referenced this issue May 6, 2023
taiki-e added a commit to taiki-e/portable-atomic that referenced this issue May 6, 2023
@bors bors closed this as completed in aa9adf4 May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. 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.

3 participants