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: broken MIR, could not prove Binder(TraitPredicate(<i32 as Copy>)) and 'no errors encountered even though delay_span_bug issued', compiler/rustc_errors/src/lib.rs:1014:13 #83628

Closed
chengniansun opened this issue Mar 29, 2021 · 2 comments
Labels
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.

Comments

@chengniansun
Copy link

Code

#![feature(no_core, lang_items)]
#![no_core]
#[lang = "sized"]
trait Sized {}
fn main() {
    if let (0, 1) = (0, 0) {}
}
#[lang = "copy"]
trait Copy {}

Meta

rustc --version --verbose:

rustc 1.53.0-nightly (9b0edb7fd 2021-03-27)
binary: rustc
commit-hash: 9b0edb7fddacd6a60a380c1ce59159de597ab270
commit-date: 2021-03-27
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

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

warning: 1 warning emitted

error: internal compiler error: broken MIR in DefId(0:2 ~ perses_node_priority_with_dfs_delta_reduced_mutant[8787]::main) (NoSolution): could not prove Binder(TraitPredicate(<i32 as Copy>))
  |
  = note: delayed at compiler/rustc_mir/src/borrow_check/type_check/mod.rs:252:27

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1014: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.53.0-nightly (9b0edb7fd 2021-03-27) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
end of query stack
Backtrace

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

warning: 1 warning emitted

error: internal compiler error: broken MIR in DefId(0:2 ~ perses_node_priority_with_dfs_delta_reduced_mutant[8787]::main) (NoSolution): could not prove Binder(TraitPredicate(<i32 as Copy>))
  |
  = note: delayed at compiler/rustc_mir/src/borrow_check/type_check/mod.rs:252:27

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1014:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/9b0edb7fddacd6a60a380c1ce59159de597ab270/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/9b0edb7fddacd6a60a380c1ce59159de597ab270/library/std/src/panicking.rs:435: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.

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 (9b0edb7fd 2021-03-27) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
end of query stack

@chengniansun chengniansun 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 29, 2021
@jonas-schievink
Copy link
Contributor

duplicate of #9307 - the Copy impl is simply missing

@jonas-schievink
Copy link
Contributor

well, maybe not even that issue would fix this, but no_core is only for use by libcore anyways

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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants