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: Can't write value with incompatible type #1330

Closed
matthiaskrgr opened this issue Dec 20, 2022 · 2 comments · Fixed by rust-lang/rust#105977
Closed

ICE: Can't write value with incompatible type #1330

matthiaskrgr opened this issue Dec 20, 2022 · 2 comments · Fixed by rust-lang/rust#105977

Comments

@matthiaskrgr
Copy link
Member

#![feature(never_type)]

use std::future::Future;

// See if we can run a basic `async fn`
pub async fn foo(x: &u32, y: u32) -> u32 {
   2
}

fn run_fut<T>(fut: impl Future<Output = T>) -> T {
    use std::sync::Arc;
    use std::task::{Context, Poll, Wake, Waker};

    struct MyWaker;
    impl Wake for MyWaker {
        fn wake(self: Arc<Self>) {
            unimplemented!()
        }
    }

    let waker = Waker::from(Arc::new(MyWaker));
    let mut context = Context::from_waker(&waker);

    let mut pinned = Box::pin(fut);
    loop {
        match pinned.as_mut().poll(&mut context) {
            Poll::Pending => continue,
            Poll::Ready(v) => return v,
        }
    }
}

fn main() {
    let x = 5;
    assert_eq!(run_fut(foo(&x, 7)), 31);
}

rustc -Zcodegen-backend=cranelift 414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs --edition=2021

warning: unused variable: `x`
 --> 414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:18
  |
6 | pub async fn foo(x: &u32, y: u32) -> u32 {
  |                  ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `y`
 --> 414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:27
  |
6 | pub async fn foo(x: &u32, y: u32) -> u32 {
  |                           ^ help: if this is intentional, prefix it with an underscore: `_y`

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `&mut std::task::Context<'_>`,
 right: `std::future::ResumeTy`: Can't write value with incompatible type Ref(ReErased, std::task::Context<'_>, Mut) to place with type Adt(std::future::ResumeTy, [])

[u32, [async fn body@414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:42: 8:2]]
[CPlace { inner: Var(_0, var0), layout: TyAndLayout { ty: u32, layout: Layout { size: Size(4 bytes), align: AbiAndPrefAlign { abi: Align(4 bytes), pref: Align(4 bytes) }, abi: Scalar(Initialized { value: Int(I32, false), valid_range: 0..=4294967295 }), fields: Primitive, largest_niche: None, variants: Single { index: 0 } } } }, CPlace { inner: Addr(Pointer { base: Addr(v0), offset: Offset32(0) }, None), layout: TyAndLayout { ty: [async fn body@414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:42: 8:2], layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes), Size(12 bytes)], memory_index: [0, 1, 2] }, largest_niche: Some(Niche { offset: Size(12 bytes), value: Int(I8, false), valid_range: 0..=2 }), variants: Multiple { tag: Initialized { value: Int(I8, false), valid_range: 0..=2 }, tag_encoding: Direct, tag_field: 2, variants: [Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 0 } }, Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 1 } }, Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 2 } }] } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss0), offset: Offset32(0) }, None), layout: TyAndLayout { ty: std::task::Waker, layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Pointer, valid_range: 0..=18446744073709551615 }, Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Arbitrary { offsets: [Size(0 bytes)], memory_index: [0] }, largest_niche: Some(Niche { offset: Size(8 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss1), offset: Offset32(0) }, None), layout: TyAndLayout { ty: std::sync::Arc<run_fut::MyWaker>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(0 bytes)], memory_index: [1, 0] }, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Addr(Pointer { base: Dangling(Align(8 bytes)), offset: Offset32(0) }, None), layout: TyAndLayout { ty: run_fut::MyWaker, layout: Layout { size: Size(0 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 0 } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss2), offset: Offset32(0) }, None), layout: TyAndLayout { ty: std::task::Context<'_>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(0 bytes)], memory_index: [1, 0] }, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Var(_6, var1), layout: TyAndLayout { ty: &std::task::Waker, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Var(_7, var2), layout: TyAndLayout { ty: &std::task::Waker, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss3), offset: Offset32(0) }, None), layout: TyAndLayout { ty: std::pin::Pin<std::boxed::Box<[async fn body@414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:42: 8:2]>>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Arbitrary { offsets: [Size(0 bytes)], memory_index: [0] }, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss4), offset: Offset32(0) }, None), layout: TyAndLayout { ty: [async fn body@414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:42: 8:2], layout: Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [Size(0 bytes), Size(8 bytes), Size(12 bytes)], memory_index: [0, 1, 2] }, largest_niche: Some(Niche { offset: Size(12 bytes), value: Int(I8, false), valid_range: 0..=2 }), variants: Multiple { tag: Initialized { value: Int(I8, false), valid_range: 0..=2 }, tag_encoding: Direct, tag_field: 2, variants: [Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 0 } }, Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 1 } }, Layout { size: Size(16 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 2 } }] } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss5), offset: Offset32(0) }, None), layout: TyAndLayout { ty: std::task::Poll<u32>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(4 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I32, false), valid_range: 0..=1 }, Union { value: Int(I32, false) }), fields: Arbitrary { offsets: [Size(0 bytes)], memory_index: [0] }, largest_niche: Some(Niche { offset: Size(0 bytes), value: Int(I32, false), valid_range: 0..=1 }), variants: Multiple { tag: Initialized { value: Int(I32, false), valid_range: 0..=1 }, tag_encoding: Direct, tag_field: 0, variants: [Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(4 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I32, false), valid_range: 0..=1 }, Union { value: Int(I32, false) }), fields: Arbitrary { offsets: [Size(4 bytes)], memory_index: [0] }, largest_niche: None, variants: Single { index: 0 } }, Layout { size: Size(4 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 1 } }] } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss6), offset: Offset32(0) }, None), layout: TyAndLayout { ty: std::pin::Pin<&mut [async fn body@414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:42: 8:2]>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Arbitrary { offsets: [Size(0 bytes)], memory_index: [0] }, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Var(_12, var3), layout: TyAndLayout { ty: &mut std::pin::Pin<std::boxed::Box<[async fn body@414d5aaf5cc7cfa317e6c363af8adbb1ca8c204c.rs:6:42: 8:2]>>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Var(_13, var4), layout: TyAndLayout { ty: &mut std::task::Context<'_>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Addr(Pointer { base: Stack(ss7), offset: Offset32(0) }, None), layout: TyAndLayout { ty: &mut std::task::Context<'_>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer, valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer, valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } } }, CPlace { inner: Var(_15, var5), layout: TyAndLayout { ty: isize, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Int(I64, true), valid_range: 0..=18446744073709551615 }), fields: Primitive, largest_niche: None, variants: Single { index: 0 } } } }, CPlace { inner: Var(_16, var6), layout: TyAndLayout { ty: bool, layout: Layout { size: Size(1 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(1 bytes) }, abi: Scalar(Initialized { value: Int(I8, false), valid_range: 0..=1 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Int(I8, false), valid_range: 0..=1 }), variants: Single { index: 0 } } } }]

function u0:5(i64) -> i32 system_v {
    ss0 = explicit_slot 16
    ss1 = explicit_slot 16
    ss2 = explicit_slot 16
    ss3 = explicit_slot 16
    ss4 = explicit_slot 16
    ss5 = explicit_slot 16
    ss6 = explicit_slot 16
    ss7 = explicit_slot 16
    sig0 = () -> i64 system_v
    sig1 = (i64) -> i64, i64 system_v
    sig2 = (i64) -> i64 system_v
    sig3 = (i64) -> i64 system_v
    sig4 = (i64) -> i64 system_v
    sig5 = (i64, i64) -> i32, i32 system_v
    fn0 = u0:14 sig0
    fn1 = u0:15 sig1
    fn2 = u0:16 sig2
    fn3 = colocated u0:2 sig3
    fn4 = colocated u0:0 sig4
    fn5 = colocated u0:4 sig5

block0(v0: i64):
    nop
    jump block1

block1:
    nop
    v1 = iconst.i8 0
    v2 = iconst.i8 1
    v3 = call fn0()
    stack_store v3, ss1
    jump block2

block2:
    nop
    v4 = stack_load.i64 ss1
    v5, v6 = call fn1(v4)
    stack_store v5, ss0
    stack_store v6, ss0+8
    jump block3

block3:
    nop
    v7 = stack_addr.i64 ss0
    v8 = call fn2(v7)
    stack_store v8, ss2
    jump block4

block4:
    nop
    v9 = iconst.i8 0
    v10 = stack_addr.i64 ss4
    v11 = load.i64 notrap aligned v0
    v12 = load.i64 notrap aligned v0+8
    store notrap aligned v11, v10
    store notrap aligned v12, v10+8
    v13 = stack_addr.i64 ss4
    v14 = call fn3(v13)
    stack_store v14, ss3
    jump block18

block5:
    nop
    v15 = stack_addr.i64 ss3
    v16 = call fn4(v15)
    stack_store v16, ss6
    jump block6

block6:
    nop
    v17 = stack_addr.i64 ss2
    stack_store v17, ss7
    v18 = stack_load.i64 ss7
    v19 = stack_load.i64 ss6
}

', src/abi/pass_mode.rs:224:5
stack backtrace:
   0:     0x7ff821766bf4 - std::backtrace_rs::backtrace::libunwind::trace::h4c97bf25d2e51ae8
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7ff821766bf4 - std::backtrace_rs::backtrace::trace_unsynchronized::h37aa0c666953359e
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ff821766bf4 - std::sys_common::backtrace::_print_fmt::hda9969f991ffe421
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7ff821766bf4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h43dbafa239606d9e
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7ff8217e4d58 - core::fmt::write::hd8b1d49ea978e1a7
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1208:17
   5:     0x7ff821726b8f - std::io::Write::write_fmt::h910d70db5835b5b3
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1682:15
   6:     0x7ff8217669f5 - std::sys_common::backtrace::_print::hba0af3cc8e4f9e16
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7ff8217669f5 - std::sys_common::backtrace::print::hcb425016d7f50579
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7ff82174e194 - std::panicking::default_hook::{{closure}}::h5a92231480ffed71
   9:     0x7ff82174deb6 - std::panicking::default_hook::h6128a4fdcff47458
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:286:9
  10:     0x7ff8242f56e2 - <alloc[8442e47aebcde8b2]::boxed::Box<dyn for<'a, 'b> core[a28e3aee1dd4a69e]::ops::function::Fn<(&'a core[a28e3aee1dd4a69e]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[a28e3aee1dd4a69e]::marker::Sync + core[a28e3aee1dd4a69e]::marker::Send> as core[a28e3aee1dd4a69e]::ops::function::Fn<(&core[a28e3aee1dd4a69e]::panic::panic_info::PanicInfo,)>>::call
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2032:9
  11:     0x7ff8242f56e2 - rustc_driver[8fc0c60c2a79a876]::DEFAULT_HOOK::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver/src/lib.rs:1202:13
  12:     0x7ff82174e947 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::haf9ff6e68c2e05a7
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2032:9
  13:     0x7ff82174e947 - std::panicking::rust_panic_with_hook::h0207dd496e646917
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:692:13
  14:     0x7ff821767e39 - std::panicking::begin_panic_handler::{{closure}}::h4f3167dde486c20a
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:579:13
  15:     0x7ff821766d3e - std::sys_common::backtrace::__rust_end_short_backtrace::h5667162f671b6d90
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:137:18
  16:     0x7ff82174e432 - rust_begin_unwind
                               at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:575:5
  17:     0x7ff8217e93f3 - core::panicking::panic_fmt::h90dee617596c399d
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:64:14
  18:     0x7ff8217e99b3 - core::panicking::assert_failed_inner::hd73710e7d07dae9a
  19:     0x7ff81b0eab89 - core[a28e3aee1dd4a69e]::panicking::assert_failed::<rustc_middle[e9b4372b5e8bc47d]::ty::Ty, rustc_middle[e9b4372b5e8bc47d]::ty::Ty>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:199:5
  20:     0x7ff81b11a0e6 - rustc_codegen_cranelift[e80a840dcfedcc0]::value_and_place::assert_assignable
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/value_and_place.rs:931:13
  21:     0x7ff81b149583 - rustc_codegen_cranelift[e80a840dcfedcc0]::abi::pass_mode::adjust_arg_for_abi
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs:224:5
  22:     0x7ff81b0c6ca6 - rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/abi/mod.rs:519:25
  23:     0x7ff81b0c6ca6 - <&mut rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0} as core[a28e3aee1dd4a69e]::ops::function::FnOnce<((usize, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument),)>>::call_once
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:629:13
  24:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::option::Option<(usize, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument)>>::map::<smallvec[72e9d56594538b7e]::IntoIter<[cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value; 2usize]>, &mut rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:969:29
  25:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::next
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/map.rs:103:9
  26:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::iter::adapters::fuse::Fuse<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>> as core[a28e3aee1dd4a69e]::iter::adapters::fuse::FuseImpl<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>>::next
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/fuse.rs:337:9
  27:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::iter::adapters::fuse::Fuse<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::next
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/fuse.rs:43:9
  28:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::iter::adapters::flatten::FlattenCompat<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>, smallvec[72e9d56594538b7e]::IntoIter<[cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value; 2usize]>> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::next
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/flatten.rs:474:19
  29:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::next
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/flatten.rs:212:9
  30:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::next::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/chain.rs:50:67
  31:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::option::Option<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>::or_else::<<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::next::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:1417:21
  32:     0x7ff81b0c6ca6 - <core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::next
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/chain.rs:50:9
  33:     0x7ff81b0c5b5b - <alloc[8442e47aebcde8b2]::vec::Vec<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>::extend_desugared::<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/mod.rs:2848:35
  34:     0x7ff81b0c5b5b - <alloc[8442e47aebcde8b2]::vec::Vec<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value> as alloc[8442e47aebcde8b2]::vec::spec_extend::SpecExtend<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value, core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>>>>::spec_extend
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/spec_extend.rs:17:9
  35:     0x7ff81b0c5b5b - <alloc[8442e47aebcde8b2]::vec::Vec<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value> as alloc[8442e47aebcde8b2]::vec::spec_from_iter_nested::SpecFromIterNested<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value, core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>>>>::from_iter
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/spec_from_iter_nested.rs:43:9
  36:     0x7ff81b0c5b5b - <alloc[8442e47aebcde8b2]::vec::Vec<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value> as alloc[8442e47aebcde8b2]::vec::spec_from_iter::SpecFromIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value, core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>>>>::from_iter
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/spec_from_iter.rs:33:9
  37:     0x7ff81b0d3f57 - <alloc[8442e47aebcde8b2]::vec::Vec<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value> as core[a28e3aee1dd4a69e]::iter::traits::collect::FromIterator<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>::from_iter::<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/mod.rs:2748:9
  38:     0x7ff81b0d3f57 - <core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::iter::adapters::chain::Chain<core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>, core[a28e3aee1dd4a69e]::option::IntoIter<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>, core[a28e3aee1dd4a69e]::iter::adapters::flatten::Flatten<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::iter::adapters::skip::Skip<core[a28e3aee1dd4a69e]::iter::adapters::enumerate::Enumerate<alloc[8442e47aebcde8b2]::vec::into_iter::IntoIter<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::CallArgument>>>, rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}::{closure#0}>>> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::collect::<alloc[8442e47aebcde8b2]::vec::Vec<cranelift_codegen[21a3c5039a2890c6]::ir::entities::Value>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/traits/iterator.rs:1837:9
  39:     0x7ff81b0d3f57 - rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/abi/mod.rs:511:25
  40:     0x7ff81b0d3f57 - rustc_codegen_cranelift[e80a840dcfedcc0]::abi::returning::codegen_with_call_return_arg::<rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call::{closure#4}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/abi/returning.rs:81:21
  41:     0x7ff81b12b4bf - rustc_codegen_cranelift[e80a840dcfedcc0]::abi::codegen_terminator_call
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/abi/mod.rs:510:5
  42:     0x7ff81b0995a7 - rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn_body::{closure#2}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/base.rs:433:21
  43:     0x7ff81b0995a7 - <rustc_data_structures[e855f16069d18ad7]::profiling::VerboseTimingGuard>::run::<(), rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn_body::{closure#2}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:726:9
  44:     0x7ff81b0995a7 - <rustc_session[bd0fec20e3e30607]::session::Session>::time::<(), rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn_body::{closure#2}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:10:9
  45:     0x7ff81b17bbb0 - rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn_body
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/base.rs:432:17
  46:     0x7ff81b17a0ee - rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn::{closure#2}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/base.rs:115:41
  47:     0x7ff81b17a0ee - <rustc_data_structures[e855f16069d18ad7]::profiling::VerboseTimingGuard>::run::<(), rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn::{closure#2}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:726:9
  48:     0x7ff81b17a0ee - <rustc_session[bd0fec20e3e30607]::session::Session>::time::<(), rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn::{closure#2}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:10:9
  49:     0x7ff81b17a0ee - rustc_codegen_cranelift[e80a840dcfedcc0]::base::codegen_fn
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/base.rs:115:5
  50:     0x7ff81b098889 - rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::module_codegen::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/driver/aot.rs:294:50
  51:     0x7ff81b098889 - <rustc_data_structures[e855f16069d18ad7]::profiling::VerboseTimingGuard>::run::<(), rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::module_codegen::{closure#0}::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:726:9
  52:     0x7ff81b098889 - <rustc_session[bd0fec20e3e30607]::session::Session>::time::<(), rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::module_codegen::{closure#0}::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:10:9
  53:     0x7ff81b098889 - rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::module_codegen::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/driver/aot.rs:293:21
  54:     0x7ff81b098889 - <rustc_data_structures[e855f16069d18ad7]::profiling::VerboseTimingGuard>::run::<(alloc[8442e47aebcde8b2]::string::String, rustc_codegen_cranelift[e80a840dcfedcc0]::CodegenCx, cranelift_object[c5896af7f33dfa77]::backend::ObjectModule, alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::base::CodegenedFunction>), rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::module_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:726:9
  55:     0x7ff81b098889 - <rustc_session[bd0fec20e3e30607]::session::Session>::time::<(alloc[8442e47aebcde8b2]::string::String, rustc_codegen_cranelift[e80a840dcfedcc0]::CodegenCx, cranelift_object[c5896af7f33dfa77]::backend::ObjectModule, alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::base::CodegenedFunction>), rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::module_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:10:9
  56:     0x7ff81b184ae9 - rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::module_codegen
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/driver/aot.rs:275:63
  57:     0x7ff81b0e4b96 - <rustc_query_system[ac6d26d16f7ebea6]::dep_graph::graph::DepGraph<rustc_middle[e9b4372b5e8bc47d]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[e9b4372b5e8bc47d]::ty::context::TyCtxt, (rustc_codegen_cranelift[e80a840dcfedcc0]::config::BackendConfig, alloc[8442e47aebcde8b2]::sync::Arc<rustc_codegen_cranelift[e80a840dcfedcc0]::global_asm::GlobalAsmConfig>, rustc_span[8293014313a13715]::symbol::Symbol, rustc_codegen_cranelift[e80a840dcfedcc0]::concurrency_limiter::ConcurrencyLimiterToken), rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/dep_graph/graph.rs:296:14
  58:     0x7ff81b0fbcbd - rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/driver/aot.rs:391:25
  59:     0x7ff81b0fbcbd - core[a28e3aee1dd4a69e]::iter::adapters::map::map_fold::<&rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, (), rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}, core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator::for_each::call<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>>::extend_trusted<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>::{closure#0}>::{closure#0}>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/map.rs:84:28
  60:     0x7ff81b0fbcbd - <core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::fold::<(), core[a28e3aee1dd4a69e]::iter::adapters::map::map_fold<&rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, (), rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}, core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator::for_each::call<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>>::extend_trusted<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>::{closure#0}>::{closure#0}>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/traits/iterator.rs:2415:21
  61:     0x7ff81b0fbcbd - <core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::fold::<(), core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator::for_each::call<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>>::extend_trusted<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>::{closure#0}>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/adapters/map.rs:124:9
  62:     0x7ff81b0c491c - <core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::for_each::<<alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>>::extend_trusted<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/traits/iterator.rs:831:9
  63:     0x7ff81b0c491c - <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>>::extend_trusted::<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/mod.rs:2880:17
  64:     0x7ff81b0c491c - <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen> as alloc[8442e47aebcde8b2]::vec::spec_extend::SpecExtend<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>>::spec_extend
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/spec_extend.rs:26:9
  65:     0x7ff81b0c491c - <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen> as alloc[8442e47aebcde8b2]::vec::spec_from_iter_nested::SpecFromIterNested<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>>::from_iter
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/spec_from_iter_nested.rs:62:9
  66:     0x7ff81b0c491c - <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen> as alloc[8442e47aebcde8b2]::vec::spec_from_iter::SpecFromIter<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen, core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>>::from_iter
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/spec_from_iter.rs:33:9
  67:     0x7ff81b1061fe - <alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen> as core[a28e3aee1dd4a69e]::iter::traits::collect::FromIterator<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>>::from_iter::<core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/vec/mod.rs:2748:9
  68:     0x7ff81b1061fe - <core[a28e3aee1dd4a69e]::iter::adapters::map::Map<core[a28e3aee1dd4a69e]::slice::iter::Iter<rustc_middle[e9b4372b5e8bc47d]::mir::mono::CodegenUnit>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}::{closure#0}> as core[a28e3aee1dd4a69e]::iter::traits::iterator::Iterator>::collect::<alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/iter/traits/iterator.rs:1837:9
  69:     0x7ff81b1061fe - rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/driver/aot.rs:379:9
  70:     0x7ff81b1061fe - <rustc_data_structures[e855f16069d18ad7]::profiling::VerboseTimingGuard>::run::<alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:726:9
  71:     0x7ff81b1061fe - <rustc_session[bd0fec20e3e30607]::session::Session>::time::<alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:10:9
  72:     0x7ff81b1061fe - rustc_codegen_cranelift[e80a840dcfedcc0]::driver::time::<alloc[8442e47aebcde8b2]::vec::Vec<rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::OngoingModuleCodegen>, rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/driver/mod.rs:52:9
  73:     0x7ff81b185209 - rustc_codegen_cranelift[e80a840dcfedcc0]::driver::aot::run_aot
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/driver/aot.rs:378:19
  74:     0x7ff81b1a3d4e - <rustc_codegen_cranelift[e80a840dcfedcc0]::CraneliftCodegenBackend as rustc_codegen_ssa[c9ce47c339d57daf]::traits::backend::CodegenBackend>::codegen_crate
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_cranelift/src/lib.rs:205:33
  75:     0x7ff824f5c97b - rustc_interface[65631d9f41be80b3]::passes::start_codegen::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:989:9
  76:     0x7ff824f5c97b - <rustc_data_structures[e855f16069d18ad7]::profiling::VerboseTimingGuard>::run::<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_interface[65631d9f41be80b3]::passes::start_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:726:9
  77:     0x7ff824f5c97b - <rustc_session[bd0fec20e3e30607]::session::Session>::time::<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_interface[65631d9f41be80b3]::passes::start_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:10:9
  78:     0x7ff824f5c97b - rustc_interface[65631d9f41be80b3]::passes::start_codegen
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:988:19
  79:     0x7ff824f5b85e - <rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:253:20
  80:     0x7ff824f5b85e - <rustc_interface[65631d9f41be80b3]::passes::QueryContext>::enter::<<rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:765:42
  81:     0x7ff824f5b85e - rustc_middle[e9b4372b5e8bc47d]::ty::context::tls::enter_context::<<rustc_interface[65631d9f41be80b3]::passes::QueryContext>::enter<<rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:1311:50
  82:     0x7ff824f5b85e - rustc_middle[e9b4372b5e8bc47d]::ty::context::tls::set_tlv::<rustc_middle[e9b4372b5e8bc47d]::ty::context::tls::enter_context<<rustc_interface[65631d9f41be80b3]::passes::QueryContext>::enter<<rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:1295:9
  83:     0x7ff824f5b85e - rustc_middle[e9b4372b5e8bc47d]::ty::context::tls::enter_context::<<rustc_interface[65631d9f41be80b3]::passes::QueryContext>::enter<<rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:1311:9
  84:     0x7ff824f5b85e - <rustc_interface[65631d9f41be80b3]::passes::QueryContext>::enter::<<rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:765:9
  85:     0x7ff824fed71a - <rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}
                               at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:240:13
  86:     0x7ff824fed71a - <core[a28e3aee1dd4a69e]::option::Option<core[a28e3aee1dd4a69e]::result::Result<alloc[8442e47aebcde8b2]::boxed::Box<dyn core[a28e3aee1dd4a69e]::any::Any>, rustc_errors[cecb0e7535209709]::ErrorGuaranteed>>>::get_or_insert_with::<<rustc_interface[65631d9f41be80b3]::queries::Queries>::ongoing_codegen::{closure#0}>
                               at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:1590:49
<snip>
@bjorn3
Copy link
Member

bjorn3 commented Dec 20, 2022

This is because of the revert of rust-lang/rust#105250. @Swatinem is working on an alternative fix.

matthiaskrgr referenced this issue in matthiaskrgr/rust Jan 18, 2023
Transform async `ResumeTy` in generator transform

- Eliminates all the `get_context` calls that async lowering created.
- Replace all `Local` `ResumeTy` types with `&mut Context<'_>`.

The `Local`s that have their types replaced are:
- The `resume` argument itself.
- The argument to `get_context`.
- The yielded value of a `yield`.

The `ResumeTy` hides a `&mut Context<'_>` behind an unsafe raw pointer, and the `get_context` function is being used to convert that back to a `&mut Context<'_>`.

Ideally the async lowering would not use the `ResumeTy`/`get_context` indirection, but rather directly use `&mut Context<'_>`, however that would currently lead to higher-kinded lifetime errors.
See <rust-lang#105501>.

The async lowering step and the type / lifetime inference / checking are still using the `ResumeTy` indirection for the time being, and that indirection is removed here. After this transform, the generator body only knows about `&mut Context<'_>`.

---

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1330 CC `@bjorn3`

r? `@compiler-errors`
GuillaumeGomez referenced this issue in GuillaumeGomez/rust Jan 19, 2023
Transform async `ResumeTy` in generator transform

- Eliminates all the `get_context` calls that async lowering created.
- Replace all `Local` `ResumeTy` types with `&mut Context<'_>`.

The `Local`s that have their types replaced are:
- The `resume` argument itself.
- The argument to `get_context`.
- The yielded value of a `yield`.

The `ResumeTy` hides a `&mut Context<'_>` behind an unsafe raw pointer, and the `get_context` function is being used to convert that back to a `&mut Context<'_>`.

Ideally the async lowering would not use the `ResumeTy`/`get_context` indirection, but rather directly use `&mut Context<'_>`, however that would currently lead to higher-kinded lifetime errors.
See <rust-lang#105501>.

The async lowering step and the type / lifetime inference / checking are still using the `ResumeTy` indirection for the time being, and that indirection is removed here. After this transform, the generator body only knows about `&mut Context<'_>`.

---

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1330 CC `@bjorn3`

r? `@compiler-errors`
@bjorn3
Copy link
Member

bjorn3 commented Feb 19, 2023

This is now fixed.

@bjorn3 bjorn3 closed this as completed Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants