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: glacier fixed/62529-07.rs #93788

Closed
matthiaskrgr opened this issue Feb 8, 2022 · 0 comments · Fixed by #93893
Closed

ICE: glacier fixed/62529-07.rs #93788

matthiaskrgr opened this issue Feb 8, 2022 · 0 comments · Fixed by #93893
Assignees
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. 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

@matthiaskrgr
Copy link
Member

Code

from glaicer fixed/62529-07.rs

struct D;

trait Tr {
    type It;
    fn foo(self) -> Option<Self::It>;
}

impl<'a> Tr for &'a D {
    type It = ();
    fn foo(self) -> Option<()> { None }
}

fn run<F>(f: F)
    where for<'a> &'a D: Tr,
          F: Fn(<&D as Tr>::It),
{
    let d = &D;
    while let Some(i) = d.foo() {
        f(i);
    }
}

fn main() {
    run(|_| {});
}

Error output

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:12 ~ 62529_07[da54]::run), const_param_did: None }) (end of phase transition to Optimization) at bb3[2]:
                                encountered `Assign(((_9.0: <&D as Tr>::It), const ()))` with incompatible types:
                                left-hand side has type: <&D as Tr>::It
                                right-hand side has type: ()
  --> ./62529-07.rs:19:9
   |
19 |         f(i);
   |         ^^^^
   |
   = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:120:36

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1176:13
searched toolchains 734368a200904ef9c21db86c595dc04263c87be0 through 0c292c9667f1b202a9150d58bdd2e89e3e803996


********************************************************************************
Regression in e7cc3bddbe0d0e374d05e7003e662bba1742dbae
********************************************************************************

cc @oli-obk / #92007

Backtrace

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:12 ~ 62529_07[da54]::run), const_param_did: None }) (end of phase transition to Optimization) at bb3[2]:
                                encountered `Assign(((_9.0: <&D as Tr>::It), const ()))` with incompatible types:
                                left-hand side has type: <&D as Tr>::It
                                right-hand side has type: ()
  --> ./62529-07.rs:19:9
   |
19 |         f(i);
   |         ^^^^
   |
   = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:120:36

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1176:13
stack backtrace:
   0:     0x7fa5918569fc - std::backtrace_rs::backtrace::libunwind::trace::hef696c91488c46df
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fa5918569fc - std::backtrace_rs::backtrace::trace_unsynchronized::h76c93ef0698d26b2
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fa5918569fc - std::sys_common::backtrace::_print_fmt::h93575aa503bf6e1b
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fa5918569fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h40967adecfbc037b
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fa5918b80dc - core::fmt::write::h03044e853df7d223
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/core/src/fmt/mod.rs:1190:17
   5:     0x7fa591846d28 - std::io::Write::write_fmt::h86bffabfad56f13c
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/io/mod.rs:1657:15
   6:     0x7fa59185a977 - std::sys_common::backtrace::_print::hd28d8aed16472cc0
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fa59185a977 - std::sys_common::backtrace::print::h8f98cdd641cb45a3
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fa59185a977 - std::panicking::default_hook::{{closure}}::h729dcf0a13bd0685
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/panicking.rs:295:22
   9:     0x7fa59185a63f - std::panicking::default_hook::h5f6c637024d9ad69
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/panicking.rs:314:9
  10:     0x7fa59203c681 - rustc_driver[a83f25a8e01ca780]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fa59185b255 - std::panicking::rust_panic_with_hook::h46cff6766bf99e7c
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/panicking.rs:702:17
  12:     0x7fa59185af07 - std::panicking::begin_panic_handler::{{closure}}::h0e775b2aa2b67693
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/panicking.rs:588:13
  13:     0x7fa591856ea4 - std::sys_common::backtrace::__rust_end_short_backtrace::h1863dd104b065b9d
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7fa59185ac09 - rust_begin_unwind
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/panicking.rs:584:5
  15:     0x7fa591822b93 - core::panicking::panic_fmt::hfdeb0fcb6ce506f4
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/core/src/panicking.rs:143:14
  16:     0x7fa59312d60c - core[efe43fe86f1c620a]::panicking::panic_display::<&str>
  17:     0x7fa5947a83dd - <rustc_errors[6e799cab4439a167]::HandlerInner>::flush_delayed
  18:     0x7fa5947a689d - <rustc_errors[6e799cab4439a167]::HandlerInner as core[efe43fe86f1c620a]::ops::drop::Drop>::drop
  19:     0x7fa593ece5e6 - core[efe43fe86f1c620a]::ptr::drop_in_place::<rustc_session[3b88a4bcbf196e76]::parse::ParseSess>
  20:     0x7fa593ed0fda - <alloc[61df3a55352cbfc0]::rc::Rc<rustc_session[3b88a4bcbf196e76]::session::Session> as core[efe43fe86f1c620a]::ops::drop::Drop>::drop
  21:     0x7fa593ec12ac - core[efe43fe86f1c620a]::ptr::drop_in_place::<rustc_interface[9582d0c3479cfa46]::interface::Compiler>
  22:     0x7fa593ec1ac1 - rustc_span[20d03c4744d90449]::with_source_map::<core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>, rustc_interface[9582d0c3479cfa46]::interface::create_compiler_and_run<core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>, rustc_driver[a83f25a8e01ca780]::run_compiler::{closure#1}>::{closure#1}>
  23:     0x7fa593ebe2d3 - rustc_interface[9582d0c3479cfa46]::interface::create_compiler_and_run::<core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>, rustc_driver[a83f25a8e01ca780]::run_compiler::{closure#1}>
  24:     0x7fa593ea44e2 - std[3d6e7d7423cf4afe]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[9582d0c3479cfa46]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[9582d0c3479cfa46]::interface::run_compiler<core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>, rustc_driver[a83f25a8e01ca780]::run_compiler::{closure#1}>::{closure#0}, core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>>::{closure#0}, core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>>
  25:     0x7fa593ea1c29 - <<std[3d6e7d7423cf4afe]::thread::Builder>::spawn_unchecked_<rustc_interface[9582d0c3479cfa46]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[9582d0c3479cfa46]::interface::run_compiler<core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>, rustc_driver[a83f25a8e01ca780]::run_compiler::{closure#1}>::{closure#0}, core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>>::{closure#0}, core[efe43fe86f1c620a]::result::Result<(), rustc_errors[6e799cab4439a167]::ErrorReported>>::{closure#1} as core[efe43fe86f1c620a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  26:     0x7fa591866ca3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf9ab37ec9b510857
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/alloc/src/boxed.rs:1854:9
  27:     0x7fa591866ca3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha1991051ebf83b9d
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/alloc/src/boxed.rs:1854:9
  28:     0x7fa591866ca3 - std::sys::unix::thread::Thread::new::thread_start::h5d1d180c2a38668b
                               at /rustc/0c292c9667f1b202a9150d58bdd2e89e3e803996/library/std/src/sys/unix/thread.rs:108:17
  29:     0x7fa59176c259 - start_thread
  30:     0x7fa5916885e3 - __GI___clone
  31:                0x0 - <unknown>

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.60.0-nightly (0c292c966 2022-02-08) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. labels Feb 8, 2022
@oli-obk oli-obk self-assigned this Feb 8, 2022
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Feb 10, 2022
@bors bors closed this as completed in 6499c5e Feb 11, 2022
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Feb 24, 2022
Revert lazy TAIT PR

Revert rust-lang/rust#92306 (sorry `@Aaron1011,` will include your changes in the fix PR)
Revert rust-lang/rust#93783
Revert rust-lang/rust#92007

fixes rust-lang/rust#93788
fixes rust-lang/rust#93794
fixes rust-lang/rust#93821
fixes rust-lang/rust#93831
fixes rust-lang/rust#93841
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. glacier ICE tracked in rust-lang/glacier. 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
3 participants