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

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

Closed
jestes15 opened this issue Dec 6, 2022 · 1 comment
Closed

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

jestes15 opened this issue Dec 6, 2022 · 1 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.

Comments

@jestes15
Copy link

jestes15 commented Dec 6, 2022

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.

@jestes15 jestes15 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 Dec 6, 2022
@apiraino
Copy link
Contributor

apiraino commented Dec 7, 2022

I think this is a duplicate of #105009

@apiraino apiraino closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2022
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