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

dtorck encountered internal error #89574

Closed
rusty-snake opened this issue Oct 5, 2021 · 4 comments · Fixed by #89585
Closed

dtorck encountered internal error #89574

rusty-snake opened this issue Oct 5, 2021 · 4 comments · Fixed by #89585
Assignees
Labels
A-destructors Area: Destructors (`Drop`, …) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@rusty-snake
Copy link
Contributor

rusty-snake commented Oct 5, 2021

Code

fn main() {
    const EMPTY_ARRAY = [];
}

Meta

Reproducible with stable and nightly compilers.

rustc --version --verbose:

rustc 1.55.0 (c8dfcfe04 2021-09-06)
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-unknown-linux-gnu
release: 1.55.0
LLVM version: 12.0.1

rustc +nightly --version --verbose:

rustc 1.57.0-nightly (003d8d3f5 2021-10-04)
binary: rustc
commit-hash: 003d8d3f56848b6f3833340e859b089a09aea36a
commit-date: 2021-10-04
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0

Maybe this is a duplicated of #72821 but I'm not sure as the example there is more complex.

Error output

rustc --edition=2018 -O ice.rs:

error: internal compiler error: dtorck encountered internal error
 --> ice.rs:2:25
  |
2 |     const EMPTY_ARRAY = [];
  |                         ^^
  |
  = note: delayed at compiler/rustc_trait_selection/src/traits/query/dropck_outlives.rs:67:18

error: internal compiler error: TyKind::Error constructed but no error reported
  |
  = note: delayed at compiler/rustc_infer/src/infer/resolve.rs:201:32

error: internal compiler error: TyKind::Error constructed but no error reported
  |
  = note: delayed at compiler/rustc_typeck/src/check/writeback.rs:753:28

error: internal compiler error: missing type for `const` item
 --> ice.rs:2:11
  |
2 |     const EMPTY_ARRAY = [];
  |           ^^^^^^^^^^^ help: provide a type for the constant: `EMPTY_ARRAY: [type error]`

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1050:13
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.55.0 (c8dfcfe04 2021-09-06) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
Backtrace

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1050:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:515:5
   1: std::panicking::begin_panic_fmt
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:457:5
   2: rustc_errors::HandlerInner::flush_delayed
   3: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
   4: core::ptr::drop_in_place<rustc_session::parse::ParseSess>
   5: <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop
   6: core::ptr::drop_in_place<rustc_interface::interface::Compiler>
   7: rustc_span::with_source_map
   8: rustc_interface::interface::create_compiler_and_run
   9: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@rusty-snake rusty-snake 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 Oct 5, 2021
@jonas-schievink jonas-schievink added A-destructors Area: Destructors (`Drop`, …) I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Oct 5, 2021
@camelid
Copy link
Member

camelid commented Oct 5, 2021

Regressed in 1.52.0. The error in 1.51.0 wasn't so great either though, but at least it didn't ICE:

error: missing type for `const` item
 --> <source>:2:11
  |
2 |     const EMPTY_ARRAY = [];
  |           ^^^^^^^^^^^ help: provide a type for the item: `EMPTY_ARRAY: [type error]`

error: aborting due to previous error

@camelid camelid added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Oct 5, 2021
@camelid
Copy link
Member

camelid commented Oct 5, 2021

Regression in nightly-2021-03-08 (too long ago to get build artifacts per commit). That's the commit range 51748a8...234781a. Possibly related to an interaction between #82720 (which seems to have landed in that commit range) and dtorck?

@nbdd0121
Copy link
Contributor

nbdd0121 commented Oct 6, 2021

@rustbot claim

@hkmatsumoto
Copy link
Member

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.
@rustbot label -I-prioritize +P-high

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Oct 6, 2021
@bors bors closed this as completed in de0b4f9 Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-destructors Area: Destructors (`Drop`, …) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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.

6 participants