Skip to content

broken MIR: bad assignment (&impl Trait = &S): NoSolution #77696

@oldoldman

Description

@oldoldman

I am not sure if this is a issue in nightly build

error: internal compiler error: broken MIR in DefId(0:12 ~ main[317d]::main[0]) (_6 = &(*_7)): bad assignment (&impl Trait = &S): NoSolution
  --> main.rs:28:26
   |
28 |   let b : & impl Trait = &S;
   |                          ^^
   |
   = note: delayed at src\librustc_mir\borrow_check\type_check\mod.rs:258:27

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src\librustc_errors\lib.rs:369:17
stack backtrace:
   0:     0x7ff807889f69 - ::fmt::h821f4dd582550bfb
   1:     0x7ff8078b6f7b - core::fmt::write::h312876c93103ed54
   2:     0x7ff80787bae4 - ::fmt::hfb43901216eaeee2
   3:     0x7ff80788f5cb - std::panicking::take_hook::h52d1f68705bfe58e
   4:     0x7ff80788f209 - std::panicking::take_hook::h52d1f68705bfe58e
   5:     0x7ff807d7f8da - rustc_driver::report_ice::h73e31dd3f37a0050
   6:     0x7ff80788ff60 - std::panicking::rust_panic_with_hook::heea127619d634446
   7:     0x7ff80c2ab7a4 - rustc_errors::diagnostic_builder::DiagnosticBuilder::code::h009cd739cbd841b8
   8:     0x7ff80c2aad9f - rustc_errors::diagnostic_builder::DiagnosticBuilder::code::h009cd739cbd841b8
   9:     0x7ff80c2a838d - rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitterWriter::ui_testing::heda1073e138862a3
  10:     0x7ff80c2727ff - ::drop::h1ca4616953ccd707
  11:     0x7ff807da3297 - ::deref::h3fbcde42f915cc45
  12:     0x7ff807dc447a - ::deref::h3fbcde42f915cc45
  13:     0x7ff807d47b1c - ::generic_arg_data::h9aab78c62ac3ba96
  14:     0x7ff807d34ed1 - ::fmt::h4d767eacfb9c0d6b
  15:     0x7ff807da082b - ::deref::h3fbcde42f915cc45
  16:     0x7ff807d8d280 - ::deref::h3fbcde42f915cc45
  17:     0x7ff807d93e3f - ::deref::h3fbcde42f915cc45
  18:     0x7ff807d2d0f3 - ::fmt::h56077a367631f1cb
  19:     0x7ff80789fcca - std::sys::windows::thread::Thread::new::ha9abef9832621dc4
  20:     0x7ff886c14c5e - BaseThreadInitThunk
  21:     0x7ff8877cf43b - RtlUserThreadStart

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.47.0-beta.1 (0f91f5c28 2020-08-25) running on x86_64-pc-windows-msvc

query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.F-impl_trait_in_bindings`#![feature(impl_trait_in_bindings)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions