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: None in trait codegen #126646

Open
matthiaskrgr opened this issue Jun 18, 2024 · 1 comment
Open

ICE: None in trait codegen #126646

matthiaskrgr opened this issue Jun 18, 2024 · 1 comment
Labels
C-bug Category: This is a bug. F-impl_trait_in_assoc_type `#![feature(impl_trait_in_assoc_type)]` F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

auto-reduced (treereduce-rust):

mod foo {
    pub trait Callable {
        type Output;
        fn call() -> Self::Output;
    }

    impl<'a, V: ?Sized> Callable for &'a () {
        type Output = ();
    }
}
use foo::*;

fn test<'a>() -> impl Sized {
    <&'a () as Callable>::call()
}

fn main() {}

original:

#![feature(impl_trait_in_assoc_type, type_alias_impl_trait)]

mod foo {
    pub trait Callable {
        type Output;
        fn call() -> Self::Output;
    }

    pub type OutputHelper = impl Sized;
    impl<'a, V: ?Sized> Callable for &'a () {
        type Output = OutputHelper;
        fn call() -> Self::Output {}
    }
}
use foo::*;

fn test<'a>() -> impl Sized {
    <&'a () as Callable>::call()
}

fn want_static<T: 'static>(_: T) {}

fn test2<'a>() {
    want_static(<&'a () as Callable>::call());
}

fn main() {}

Version information

rustc 1.81.0-nightly (dd104ef16 2024-06-18)
binary: rustc
commit-hash: dd104ef16315e2387fe94e8c43eb5a66e3dbd660
commit-date: 2024-06-18
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

thread 'rustc' panicked at compiler/rustc_traits/src/codegen.rs:81:38:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7200b847a935 - std::backtrace_rs::backtrace::libunwind::trace::h24001de405a19c29
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7200b847a935 - std::backtrace_rs::backtrace::trace_unsynchronized::h52cb31f58d87e795
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7200b847a935 - std::sys::backtrace::_print_fmt::ha0a4a385e6305dc9
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/sys/backtrace.rs:68:5
   3:     0x7200b847a935 - <std::sys::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd2ac9d261fff2c5c
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/sys/backtrace.rs:44:22
   4:     0x7200b84cb4db - core::fmt::rt::Argument::fmt::h5dd96858711c38a5
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/core/src/fmt/rt.rs:165:63
   5:     0x7200b84cb4db - core::fmt::write::h9137aaeb0715e137
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/core/src/fmt/mod.rs:1168:21
   6:     0x7200b846f51f - std::io::Write::write_fmt::h3d543f59fe71748a
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/io/mod.rs:1835:15
   7:     0x7200b847a70e - std::sys::backtrace::_print::h4a7caef85c10fa0d
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/sys/backtrace.rs:47:5
   8:     0x7200b847a70e - std::sys::backtrace::print::hf1ff8c4b50b84478
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/sys/backtrace.rs:34:9
   9:     0x7200b847d149 - std::panicking::default_hook::{{closure}}::h76d1d90acd3a4473
  10:     0x7200b847ceec - std::panicking::default_hook::h2a49ac4243aa5140
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/panicking.rs:292:9
  11:     0x7200b4cacd2f - std[49f1045a74567fa7]::panicking::update_hook::<alloc[5df14249ca9505f2]::boxed::Box<rustc_driver_impl[db4e8f03b5696bb3]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7200b847da6f - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h25f6191eb839a16b
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/alloc/src/boxed.rs:2076:9
  13:     0x7200b847da6f - std::panicking::rust_panic_with_hook::hc9c5e69e405d5d6c
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/panicking.rs:804:13
  14:     0x7200b847d663 - std::panicking::begin_panic_handler::{{closure}}::h1e191b09b1d4d3a1
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/panicking.rs:663:13
  15:     0x7200b847adf9 - std::sys::backtrace::__rust_end_short_backtrace::hcf45e4c7144c2449
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/sys/backtrace.rs:171:18
  16:     0x7200b847d324 - rust_begin_unwind
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/panicking.rs:661:5
  17:     0x7200b84c7a93 - core::panicking::panic_fmt::h16e3e243fb3ae09b
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/core/src/panicking.rs:74:14
  18:     0x7200b84c7b1c - core::panicking::panic::h602a9ee3e943791e
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/core/src/panicking.rs:148:5
  19:     0x7200b84c7889 - core::option::unwrap_failed::h32ee57917be56d39
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/core/src/option.rs:2011:5
  20:     0x7200b2adc83d - rustc_traits[85d1f1446d62d4f5]::codegen::codegen_select_candidate
  21:     0x7200b65d27b7 - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::codegen_select_candidate::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 16usize]>>
  22:     0x7200b65d2ae2 - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::DefaultCache<(rustc_middle[1b5811ec6d2edbd2]::ty::ParamEnv, rustc_type_ir[9d828e6be873c6e9]::predicate::TraitRef<rustc_middle[1b5811ec6d2edbd2]::ty::context::TyCtxt>), rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  23:     0x7200b65d275e - rustc_query_impl[ed5fbfae2043678b]::query_impl::codegen_select_candidate::get_query_non_incr::__rust_end_short_backtrace
  24:     0x7200b39e172a - rustc_ty_utils[cae5f04a34a68424]::instance::resolve_instance
  25:     0x7200b6539e69 - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::resolve_instance::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 32usize]>>
  26:     0x7200b653a1a5 - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::DefaultCache<rustc_middle[1b5811ec6d2edbd2]::ty::ParamEnvAnd<(rustc_span[b2dab8d5db9c06d4]::def_id::DefId, &rustc_middle[1b5811ec6d2edbd2]::ty::list::RawList<(), rustc_middle[1b5811ec6d2edbd2]::ty::generic_args::GenericArg>)>, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 32usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  27:     0x7200b6539dfd - rustc_query_impl[ed5fbfae2043678b]::query_impl::resolve_instance::get_query_non_incr::__rust_end_short_backtrace
  28:     0x7200b653c7e8 - <rustc_middle[1b5811ec6d2edbd2]::ty::instance::Instance>::resolve
  29:     0x7200b640e003 - rustc_mir_build[10942160e2184657]::build::mir_build
  30:     0x7200b640b38e - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>
  31:     0x7200b63be0ae - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::VecCache<rustc_span[b2dab8d5db9c06d4]::def_id::LocalDefId, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  32:     0x7200b63bdbcd - rustc_query_impl[ed5fbfae2043678b]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  33:     0x7200b601e856 - rustc_mir_transform[9ac0af314c39e32b]::ffi_unwind_calls::has_ffi_unwind_calls
  34:     0x7200b601e2e9 - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::has_ffi_unwind_calls::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>
  35:     0x7200b63f3551 - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::VecCache<rustc_span[b2dab8d5db9c06d4]::def_id::LocalDefId, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  36:     0x7200b63f3141 - rustc_query_impl[ed5fbfae2043678b]::query_impl::has_ffi_unwind_calls::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7200b393f30b - rustc_mir_transform[9ac0af314c39e32b]::mir_promoted
  38:     0x7200b66cfb5a - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 16usize]>>
  39:     0x7200b66cfe33 - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::VecCache<rustc_span[b2dab8d5db9c06d4]::def_id::LocalDefId, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  40:     0x7200b6fb2c50 - rustc_query_impl[ed5fbfae2043678b]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7200b6fb2d43 - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>
  42:     0x7200b63be0ae - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::VecCache<rustc_span[b2dab8d5db9c06d4]::def_id::LocalDefId, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  43:     0x7200b63bdb0d - rustc_query_impl[ed5fbfae2043678b]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  44:     0x7200b6293a05 - rustc_middle[1b5811ec6d2edbd2]::query::plumbing::query_get_at::<rustc_query_system[f4d6069fb68f5c49]::query::caches::VecCache<rustc_span[b2dab8d5db9c06d4]::def_id::LocalDefId, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>>
  45:     0x7200b6dfdf4a - rustc_hir_analysis[afae3ead62935b7b]::collect::type_of::type_of_opaque
  46:     0x7200b6dfddab - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>
  47:     0x7200b609d75b - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::DefIdCache<rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  48:     0x7200b70f9876 - rustc_query_impl[ed5fbfae2043678b]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  49:     0x7200b65f04d8 - rustc_middle[1b5811ec6d2edbd2]::query::plumbing::query_get_at::<rustc_query_system[f4d6069fb68f5c49]::query::caches::DefIdCache<rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>>
  50:     0x7200b3b5b1c5 - rustc_hir_analysis[afae3ead62935b7b]::collect::type_of::type_of
  51:     0x7200b609eb6a - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>
  52:     0x7200b609d75b - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::DefIdCache<rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  53:     0x7200b609d2fb - rustc_query_impl[ed5fbfae2043678b]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  54:     0x7200b65f04d8 - rustc_middle[1b5811ec6d2edbd2]::query::plumbing::query_get_at::<rustc_query_system[f4d6069fb68f5c49]::query::caches::DefIdCache<rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 8usize]>>>
  55:     0x7200b2992133 - rustc_hir_analysis[afae3ead62935b7b]::check::check::check_item_type
  56:     0x7200b38a4407 - rustc_hir_analysis[afae3ead62935b7b]::check::wfcheck::check_well_formed
  57:     0x7200b63a843d - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>
  58:     0x7200b63a86aa - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::VecCache<rustc_hir[7b564558969ebbbd]::hir_id::OwnerId, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  59:     0x7200b63a841a - rustc_query_impl[ed5fbfae2043678b]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  60:     0x7200b63a918f - rustc_hir_analysis[afae3ead62935b7b]::check::wfcheck::check_mod_type_wf
  61:     0x7200b63a8fd5 - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>
  62:     0x7200b6dd0bba - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::DefaultCache<rustc_span[b2dab8d5db9c06d4]::def_id::LocalModDefId, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  63:     0x7200b6dd0975 - rustc_query_impl[ed5fbfae2043678b]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  64:     0x7200b63bac8c - rustc_hir_analysis[afae3ead62935b7b]::check_crate
  65:     0x7200b6a032c7 - rustc_interface[c6ece38a3a908c28]::passes::analysis
  66:     0x7200b6a02e07 - rustc_query_impl[ed5fbfae2043678b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ed5fbfae2043678b]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>
  67:     0x7200b6e360a5 - rustc_query_system[f4d6069fb68f5c49]::query::plumbing::try_execute_query::<rustc_query_impl[ed5fbfae2043678b]::DynamicConfig<rustc_query_system[f4d6069fb68f5c49]::query::caches::SingleCache<rustc_middle[1b5811ec6d2edbd2]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ed5fbfae2043678b]::plumbing::QueryCtxt, false>
  68:     0x7200b6e35e0f - rustc_query_impl[ed5fbfae2043678b]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  69:     0x7200b6cdd3d2 - rustc_interface[c6ece38a3a908c28]::interface::run_compiler::<core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>, rustc_driver_impl[db4e8f03b5696bb3]::run_compiler::{closure#0}>::{closure#1}
  70:     0x7200b6cb54c9 - std[49f1045a74567fa7]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c6ece38a3a908c28]::util::run_in_thread_with_globals<rustc_interface[c6ece38a3a908c28]::util::run_in_thread_pool_with_globals<rustc_interface[c6ece38a3a908c28]::interface::run_compiler<core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>, rustc_driver_impl[db4e8f03b5696bb3]::run_compiler::{closure#0}>::{closure#1}, core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>>::{closure#0}, core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>>
  71:     0x7200b6cb527a - <<std[49f1045a74567fa7]::thread::Builder>::spawn_unchecked_<rustc_interface[c6ece38a3a908c28]::util::run_in_thread_with_globals<rustc_interface[c6ece38a3a908c28]::util::run_in_thread_pool_with_globals<rustc_interface[c6ece38a3a908c28]::interface::run_compiler<core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>, rustc_driver_impl[db4e8f03b5696bb3]::run_compiler::{closure#0}>::{closure#1}, core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>>::{closure#0}, core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3c5d2e85893f84f8]::result::Result<(), rustc_span[b2dab8d5db9c06d4]::ErrorGuaranteed>>::{closure#2} as core[3c5d2e85893f84f8]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  72:     0x7200b84878eb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::haf6c6ed15ef7c4b2
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/alloc/src/boxed.rs:2062:9
  73:     0x7200b84878eb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3648257e1237816c
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/alloc/src/boxed.rs:2062:9
  74:     0x7200b84878eb - std::sys::pal::unix::thread::Thread::new::thread_start::h379e689399d87cbf
                               at /rustc/dd104ef16315e2387fe94e8c43eb5a66e3dbd660/library/std/src/sys/pal/unix/thread.rs:108:17
  75:     0x7200b18a6ded - <unknown>
  76:     0x7200b192a0dc - <unknown>
  77:                0x0 - <unknown>

error: 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: please make sure that you have updated to the latest nightly

note: rustc 1.81.0-nightly (dd104ef16 2024-06-18) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [codegen_select_candidate] computing candidate for `<&() as foo::Callable>`
#1 [resolve_instance] resolving instance `<&() as foo::Callable>::call`
end of query stack
error[E0207]: the type parameter `V` is not constrained by the impl trait, self type, or predicates
 --> /tmp/icemaker_global_tempdir.cfm68XSIYmML/rustc_testrunner_tmpdir_reporting.iKwq5UVXig7Z/mvce.rs:7:14
  |
7 |     impl<'a, V: ?Sized> Callable for &'a () {
  |              ^ unconstrained type parameter

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0207`.

@rustbot label +F-impl_trait_in_assoc_type +F-type_alias_impl_trait

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. labels Jun 18, 2024
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. F-impl_trait_in_assoc_type `#![feature(impl_trait_in_assoc_type)]` F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` labels Jun 18, 2024
@matthiaskrgr
Copy link
Member Author

#121154 cc @oli-obk

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 23, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Jun 30, 2024
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. F-impl_trait_in_assoc_type `#![feature(impl_trait_in_assoc_type)]` F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. 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

3 participants