Skip to content

Internal Compiler Error when compiling cargo-shuttle v0.7.2 #105355

Closed as not planned
@jestes15

Description

@jestes15

Code

#[stable(feature = "drop_in_place", since = "1.8.0")]
#[lang = "drop_in_place"]
#[allow(unconditional_recursion)]
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    // Code here does not matter - this is replaced by the
    // real drop glue by the compiler.

    // SAFETY: see comment above
    unsafe { drop_in_place(to_drop) }
}

Meta

rustc --version --verbose:

rustc 1.67.0-nightly (c97b539e4 2022-11-30)
binary: rustc
commit-hash: c97b539e408ea353f4fde2f9251d598291fec421
commit-date: 2022-11-30
host: x86_64-unknown-linux-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4

Error output

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DropGlue(DefId(2:2801 ~ core[7784]::ptr::drop_in_place), Some(futures::stream::TryFlatten<futures::future::IntoStream<futures::future::MapOk<[async block@bollard::Docker::process_request::{closure#0}], fn(tokio_tungstenite::tungstenite::http::Response<hyper::body::body::Body>) -> impl futures::Stream<Item = std::result::Result<bollard::service::CreateImageInfo, bollard::errors::Error>> {bollard::Docker::decode_into_stream::<bollard::service::CreateImageInfo>}>>>)) (after phase change to runtime-optimized) at bb3[0]:
                                Field projection `(*_1).field[1]` specified type `std::option::Option<tokio_util::codec::framed_read::FramedRead<bollard::read::StreamReader<futures::stream::MapErr<hyper::body::body::Body, fn(hyper::error::Error) -> bollard::errors::Error {<bollard::errors::Error as std::convert::From<hyper::error::Error>>::from}>>, bollard::read::JsonLineDecoder<bollard::service::CreateImageInfo>>>`, but actual type is `std::option::Option<<futures::future::IntoStream<futures::future::MapOk<[async block@bollard::Docker::process_request::{closure#0}], fn(tokio_tungstenite::tungstenite::http::Response<hyper::body::body::Body>) -> impl futures::Stream<Item = std::result::Result<bollard::service::CreateImageInfo, bollard::errors::Error>> {bollard::Docker::decode_into_stream::<bollard::service::CreateImageInfo>}>> as futures::TryStream>::Ok>`
   --> /home/bl4z3-ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:490:1
    |
490 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:229:30

error: internal compiler error: broken MIR in DropGlue(DefId(2:2801 ~ core[7784]::ptr::drop_in_place), Some(futures::stream::TryFlatten<futures::future::IntoStream<futures::future::MapOk<[async block@bollard::Docker::process_request::{closure#0}], fn(tokio_tungstenite::tungstenite::http::Response<hyper::body::body::Body>) -> impl futures::Stream<Item = std::result::Result<bollard::service::CreateImageInfo, bollard::errors::Error>> {bollard::Docker::decode_into_stream::<bollard::service::CreateImageInfo>}>>>)) (after phase change to runtime-optimized) at bb4[0]:
                                Field projection `(*_1).field[1]` specified type `std::option::Option<tokio_util::codec::framed_read::FramedRead<bollard::read::StreamReader<futures::stream::MapErr<hyper::body::body::Body, fn(hyper::error::Error) -> bollard::errors::Error {<bollard::errors::Error as std::convert::From<hyper::error::Error>>::from}>>, bollard::read::JsonLineDecoder<bollard::service::CreateImageInfo>>>`, but actual type is `std::option::Option<<futures::future::IntoStream<futures::future::MapOk<[async block@bollard::Docker::process_request::{closure#0}], fn(tokio_tungstenite::tungstenite::http::Response<hyper::body::body::Body>) -> impl futures::Stream<Item = std::result::Result<bollard::service::CreateImageInfo, bollard::errors::Error>> {bollard::Docker::decode_into_stream::<bollard::service::CreateImageInfo>}>> as futures::TryStream>::Ok>`
   --> /home/bl4z3-ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:490:1
    |
490 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:229:30

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1609:13
Backtrace

stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::flush_delayed::<alloc::vec::Vec<rustc_errors::diagnostic::Diagnostic>, &str>
   3: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
   4: core::ptr::drop_in_place::<rustc_session::parse::ParseSess>
   5: core::ptr::drop_in_place::<rustc_session::session::Session>
   6: core::ptr::drop_in_place::<rustc_interface::interface::Compiler>
   7: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
   8: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions