Skip to content

Unimplemented selecting Binder(<std::pin::Pin<std::boxed::Box<B>> as std::ops::Drop>, []) #99575

Closed

Description

@chrisprice

Code

use std::pin::Pin;

fn main() {
    let a = Enum::A(Pin::new(Box::new(A())));
    let b = Enum::B(Pin::new(Box::new(B())));
    println!("{:?} {:?}", a, b);
}

#[derive(Debug)]
enum Enum {
    A(Pin<Box<A>>),
    B(Pin<Box<B>>),
}

#[derive(Debug)]
struct A();

impl Drop for Pin<Box<A>> {
    fn drop(&mut self) {}
}

#[derive(Debug)]
struct B();

// UNCOMMENT TO FIX COMPILER ERROR
// impl Drop for Pin<Box<B>> {
//     fn drop(&mut self) {}
// }

Meta

rustc --version --verbose:

rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: aarch64-apple-darwin
release: 1.60.0
LLVM version: 14.0.0

Error output

   Compiling rust-pin-box-drop-compiler-error v0.1.0 (/<snip>/rust-pin-box-drop-compiler-error)
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: ErrorReported', compiler/rustc_monomorphize/src/collector.rs:902:84
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: <rustc_monomorphize::collector::MirNeighborCollector as rustc_middle::mir::visit::Visitor>::visit_terminator
   4: rustc_monomorphize::collector::collect_neighbours
   5: rustc_monomorphize::collector::collect_items_rec
   6: rustc_monomorphize::collector::collect_items_rec
   7: rustc_monomorphize::collector::collect_items_rec
   8: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
   9: rustc_monomorphize::collector::collect_crate_mono_items
  10: rustc_monomorphize::partitioning::collect_and_partition_mono_items
  11: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>
  12: rustc_data_structures::stack::ensure_sufficient_stack::<((&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit]), rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, (), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>::{closure#3}>
  13: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>>
  14: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::collect_and_partition_mono_items, rustc_query_impl::plumbing::QueryCtxt>
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  16: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  17: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorReported>>
  18: <rustc_interface::queries::Queries>::ongoing_codegen
  19: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>
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.60.0 (7737e0b5c 2022-04-04) running on aarch64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: internal compiler error: Encountered error `Unimplemented` selecting `Binder(<std::pin::Pin<std::boxed::Box<B>> as std::ops::Drop>, [])` during codegen
  |
  = note: delayed at compiler/rustc_trait_selection/src/traits/codegen.rs:69:32

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1176:13
stack backtrace:
   0:        0x1035b7118 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h10cf06316d33e2a9
   1:        0x103603808 - core::fmt::write::h1faf18c959c3a8df
   2:        0x1035a9104 - std::io::Write::write_fmt::h86ab231360bc97d2
   3:        0x1035bae44 - std::panicking::default_hook::{{closure}}::h36e628ffaf3cd44f
   4:        0x1035baabc - std::panicking::default_hook::h3ee1564a7544e58f
   5:        0x10a9905c4 - rustc_driver[3e35567b0507961a]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x1035bb634 - std::panicking::rust_panic_with_hook::h191339fbd2fe2360
   7:        0x1035bb388 - std::panicking::begin_panic_handler::{{closure}}::h91c230befd9929e3
   8:        0x1035b7600 - std::sys_common::backtrace::__rust_end_short_backtrace::haaaeebb1d37476b3
   9:        0x1035bb0c4 - _rust_begin_unwind
  10:        0x1036317fc - core::panicking::panic_fmt::h4fe1013b011ef602
  11:        0x10e607e3c - core[e180da0f2c78f25f]::panicking::panic_display::<&str>
  12:        0x10e605724 - <rustc_errors[677d6d214e1093d1]::HandlerInner>::flush_delayed
  13:        0x10e60183c - <rustc_errors[677d6d214e1093d1]::HandlerInner as core[e180da0f2c78f25f]::ops::drop::Drop>::drop
  14:        0x10a9816e4 - core[e180da0f2c78f25f]::ptr::drop_in_place::<rustc_session[d383daeae0c11292]::parse::ParseSess>
  15:        0x10a985e04 - <alloc[a4749b0ad82606d]::rc::Rc<rustc_session[d383daeae0c11292]::session::Session> as core[e180da0f2c78f25f]::ops::drop::Drop>::drop
  16:        0x10a92e27c - core[e180da0f2c78f25f]::ptr::drop_in_place::<rustc_interface[2280aded15839b11]::interface::Compiler>
  17:        0x10a937c70 - rustc_interface[2280aded15839b11]::interface::create_compiler_and_run::<core[e180da0f2c78f25f]::result::Result<(), rustc_errors[677d6d214e1093d1]::ErrorReported>, rustc_driver[3e35567b0507961a]::run_compiler::{closure#1}>
  18:        0x10a91ecb0 - std[8541ff70ccfedbb0]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[2280aded15839b11]::util::run_in_thread_pool_with_globals<rustc_interface[2280aded15839b11]::interface::run_compiler<core[e180da0f2c78f25f]::result::Result<(), rustc_errors[677d6d214e1093d1]::ErrorReported>, rustc_driver[3e35567b0507961a]::run_compiler::{closure#1}>::{closure#0}, core[e180da0f2c78f25f]::result::Result<(), rustc_errors[677d6d214e1093d1]::ErrorReported>>::{closure#0}, core[e180da0f2c78f25f]::result::Result<(), rustc_errors[677d6d214e1093d1]::ErrorReported>>
  19:        0x10a998648 - <<std[8541ff70ccfedbb0]::thread::Builder>::spawn_unchecked_<rustc_interface[2280aded15839b11]::util::run_in_thread_pool_with_globals<rustc_interface[2280aded15839b11]::interface::run_compiler<core[e180da0f2c78f25f]::result::Result<(), rustc_errors[677d6d214e1093d1]::ErrorReported>, rustc_driver[3e35567b0507961a]::run_compiler::{closure#1}>::{closure#0}, core[e180da0f2c78f25f]::result::Result<(), rustc_errors[677d6d214e1093d1]::ErrorReported>>::{closure#0}, core[e180da0f2c78f25f]::result::Result<(), rustc_errors[677d6d214e1093d1]::ErrorReported>>::{closure#1} as core[e180da0f2c78f25f]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  20:        0x1035c6b70 - std::sys::unix::thread::Thread::new::thread_start::h8ccdabc567c5eee0
  21:        0x1939c626c - __pthread_deallocate

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 (7737e0b5c 2022-04-04) running on aarch64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `rust-pin-box-drop-compiler-error`

Caused by:
  process didn't exit successfully: `rustc --crate-name rust_pin_box_drop_compiler_error --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C metadata=55127a2ec1f0f6f9 -C extra-filename=-55127a2ec1f0f6f9 --out-dir /<snip>/rust-pin-box-drop-compiler-error/target/debug/deps -C incremental=/<snip>/rust-pin-box-drop-compiler-error/target/debug/incremental -L dependency=/<snip>/rust-pin-box-drop-compiler-error/target/debug/deps` (signal: 6, SIGABRT: process abort signal)```


Activity

  1. added
    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.
    on Jul 21, 2022
  2. fmease commented on Jul 21, 2022

    @fmease
    Member

    ICE also happens on nightly.

    Backtrace
    thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_monomorphize/src/collector.rs:961:13
    stack backtrace:
       0:     0x7f724636ced0 - std::backtrace_rs::backtrace::libunwind::trace::h6b3f9f41ee650c4f
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
       1:     0x7f724636ced0 - std::backtrace_rs::backtrace::trace_unsynchronized::he56cb04310aea81a
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
       2:     0x7f724636ced0 - std::sys_common::backtrace::_print_fmt::h6d4ec34d6cd34171
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/sys_common/backtrace.rs:66:5
       3:     0x7f724636ced0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h01911f0526d8b05c
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/sys_common/backtrace.rs:45:22
       4:     0x7f72463c82ac - core::fmt::write::h49f323f7091ea1c8
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/core/src/fmt/mod.rs:1198:17
       5:     0x7f724635dd85 - std::io::Write::write_fmt::hbf1f476d48d43edd
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/io/mod.rs:1672:15
       6:     0x7f724636fba1 - std::sys_common::backtrace::_print::h2bbdb393c4180f57
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/sys_common/backtrace.rs:48:5
       7:     0x7f724636fba1 - std::sys_common::backtrace::print::h4200c2a0dbbbc055
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/sys_common/backtrace.rs:35:9
       8:     0x7f724636fba1 - std::panicking::default_hook::{{closure}}::h393b25bd4d38364f
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/panicking.rs:295:22
       9:     0x7f724636f873 - std::panicking::default_hook::h70f1f206e4c542c6
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/panicking.rs:314:9
      10:     0x7f7248bc75f1 - <rustc_driver[72308b4096139644]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[cd150e9e29982b29]::ops::function::FnOnce<(&core[cd150e9e29982b29]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
      11:     0x7f72463703d6 - std::panicking::rust_panic_with_hook::hdfebab2861adaf27
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/panicking.rs:702:17
      12:     0x7f72463701e9 - std::panicking::begin_panic_handler::{{closure}}::h7b45e1150590a6fe
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/panicking.rs:586:13
      13:     0x7f724636d3b4 - std::sys_common::backtrace::__rust_end_short_backtrace::hcfb5f80ba126c43c
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/sys_common/backtrace.rs:138:18
      14:     0x7f724636ff52 - rust_begin_unwind
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/panicking.rs:584:5
      15:     0x7f72463c4d83 - core::panicking::panic_fmt::h819a1bea3462d6ca
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/core/src/panicking.rs:142:14
      16:     0x7f72463c4bcd - core::panicking::panic::h9b1240c8697457a7
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/core/src/panicking.rs:48:5
      17:     0x7f724777d488 - rustc_monomorphize[5cdd28e9061c1419]::collector::collect_neighbours
      18:     0x7f7247774206 - rustc_monomorphize[5cdd28e9061c1419]::collector::collect_items_rec
      19:     0x7f72477746ec - rustc_monomorphize[5cdd28e9061c1419]::collector::collect_items_rec
      20:     0x7f72477746ec - rustc_monomorphize[5cdd28e9061c1419]::collector::collect_items_rec
      21:     0x7f7248211abb - <rustc_session[b6be1dcf14d2202f]::session::Session>::time::<(), rustc_monomorphize[5cdd28e9061c1419]::collector::collect_crate_mono_items::{closure#1}>
      22:     0x7f724821168b - rustc_monomorphize[5cdd28e9061c1419]::collector::collect_crate_mono_items
      23:     0x7f7248210356 - rustc_monomorphize[5cdd28e9061c1419]::partitioning::collect_and_partition_mono_items
      24:     0x7f72486dbb75 - rustc_query_system[2682b511cc84fabe]::query::plumbing::try_execute_query::<rustc_query_impl[5e8382c68d202a33]::plumbing::QueryCtxt, rustc_query_system[2682b511cc84fabe]::query::caches::DefaultCache<(), (&std[778605c8b9d7d939]::collections::hash::set::HashSet<rustc_span[7c9df871791ece55]::def_id::DefId, core[cd150e9e29982b29]::hash::BuildHasherDefault<rustc_hash[9783f680492ba222]::FxHasher>>, &[rustc_middle[c6afec08b0d1be81]::mir::mono::CodegenUnit])>>
      25:     0x7f72486db8d0 - rustc_query_system[2682b511cc84fabe]::query::plumbing::get_query::<rustc_query_impl[5e8382c68d202a33]::queries::collect_and_partition_mono_items, rustc_query_impl[5e8382c68d202a33]::plumbing::QueryCtxt>
      26:     0x7f72486db822 - <rustc_query_impl[5e8382c68d202a33]::Queries as rustc_middle[c6afec08b0d1be81]::ty::query::QueryEngine>::collect_and_partition_mono_items
      27:     0x7f724886e586 - rustc_codegen_ssa[72bdf18198f6cb76]::base::codegen_crate::<rustc_codegen_llvm[d9a63b68ef949d5a]::LlvmCodegenBackend>
      28:     0x7f724886e351 - <rustc_codegen_llvm[d9a63b68ef949d5a]::LlvmCodegenBackend as rustc_codegen_ssa[72bdf18198f6cb76]::traits::backend::CodegenBackend>::codegen_crate
      29:     0x7f72482b7ec7 - <rustc_session[b6be1dcf14d2202f]::session::Session>::time::<alloc[110eb368cf5d93ca]::boxed::Box<dyn core[cd150e9e29982b29]::any::Any>, rustc_interface[8ca32d3d634051a7]::passes::start_codegen::{closure#0}>
      30:     0x7f72482b77e3 - <rustc_interface[8ca32d3d634051a7]::passes::QueryContext>::enter::<<rustc_interface[8ca32d3d634051a7]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[cd150e9e29982b29]::result::Result<alloc[110eb368cf5d93ca]::boxed::Box<dyn core[cd150e9e29982b29]::any::Any>, rustc_errors[5ec552083a70b038]::ErrorGuaranteed>>
      31:     0x7f72482af233 - <rustc_interface[8ca32d3d634051a7]::queries::Queries>::ongoing_codegen
      32:     0x7f72482ae291 - <rustc_interface[8ca32d3d634051a7]::interface::Compiler>::enter::<rustc_driver[72308b4096139644]::run_compiler::{closure#1}::{closure#2}, core[cd150e9e29982b29]::result::Result<core[cd150e9e29982b29]::option::Option<rustc_interface[8ca32d3d634051a7]::queries::Linker>, rustc_errors[5ec552083a70b038]::ErrorGuaranteed>>
      33:     0x7f72482a929f - rustc_span[7c9df871791ece55]::with_source_map::<core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>, rustc_interface[8ca32d3d634051a7]::interface::create_compiler_and_run<core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>, rustc_driver[72308b4096139644]::run_compiler::{closure#1}>::{closure#1}>
      34:     0x7f72482a8c90 - rustc_interface[8ca32d3d634051a7]::interface::create_compiler_and_run::<core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>, rustc_driver[72308b4096139644]::run_compiler::{closure#1}>
      35:     0x7f72482a7722 - <scoped_tls[3f6da10b6a2c80a0]::ScopedKey<rustc_span[7c9df871791ece55]::SessionGlobals>>::set::<rustc_interface[8ca32d3d634051a7]::interface::run_compiler<core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>, rustc_driver[72308b4096139644]::run_compiler::{closure#1}>::{closure#0}, core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>>
      36:     0x7f72482a6bdf - std[778605c8b9d7d939]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[8ca32d3d634051a7]::util::run_in_thread_pool_with_globals<rustc_interface[8ca32d3d634051a7]::interface::run_compiler<core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>, rustc_driver[72308b4096139644]::run_compiler::{closure#1}>::{closure#0}, core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>>::{closure#0}, core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>>
      37:     0x7f72489e53e9 - <<std[778605c8b9d7d939]::thread::Builder>::spawn_unchecked_<rustc_interface[8ca32d3d634051a7]::util::run_in_thread_pool_with_globals<rustc_interface[8ca32d3d634051a7]::interface::run_compiler<core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>, rustc_driver[72308b4096139644]::run_compiler::{closure#1}>::{closure#0}, core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>>::{closure#0}, core[cd150e9e29982b29]::result::Result<(), rustc_errors[5ec552083a70b038]::ErrorGuaranteed>>::{closure#1} as core[cd150e9e29982b29]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
      38:     0x7f724637a193 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1a098e41f44eb0a6
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/alloc/src/boxed.rs:1935:9
      39:     0x7f724637a193 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc5709f2569386b76
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/alloc/src/boxed.rs:1935:9
      40:     0x7f724637a193 - std::sys::unix::thread::Thread::new::thread_start::h0444ab80c205eb75
                                   at /rustc/f8588549c3c3d45c32b404210cada01e2a45def3/library/std/src/sys/unix/thread.rs:108:17
      41:     0x7f724608c54d - <unknown>
      42:     0x7f7246111874 - clone
      43:                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.64.0-nightly (f8588549c 2022-07-18) running on x86_64-unknown-linux-gnu
    
    query stack during panic:
    #0 [collect_and_partition_mono_items] collect_and_partition_mono_items
    end of query stack
    
  3. added a commit that references this issue on Jul 21, 2022
  4. compiler-errors commented on Jul 21, 2022

    @compiler-errors
    Contributor

    This is a fun issue. It's because Pin<T> is #[fundamental], and (disclaimer: this is my theory, didn't look too far into it) I don't think we look deeper than one ADT (enum/struct/union) when seeing if type needs a drop call inserted, so since we have an impl Drop for Pin<_1>, it makes us think we need to insert drops for all Pin<_2> types, even if _1 != _2.

    We should be disallowing impl Drop for Pin<Box<A>> though. Put up a PR in #99576 to do this.

  5. added a commit that references this issue on Aug 19, 2022
    0788442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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.glacierICE tracked in rust-lang/glacier.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions