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: DefId for Sized does not have a "type_of" #104328

Closed
jruderman opened this issue Nov 12, 2022 · 0 comments · Fixed by #104334
Closed

ICE: DefId for Sized does not have a "type_of" #104328

jruderman opened this issue Nov 12, 2022 · 0 comments · Fixed by #104334
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jruderman
Copy link
Contributor

Code

#![feature(object_safe_for_dispatch)]

trait Foo {
    fn f() {}
}

impl Foo for dyn Sized {}

fn main() {
    Foo::f();
}

Error output

thread 'rustc' panicked at 'DefId(2:3419 ~ core[0032]::marker::Sized) does not have a "type_of"', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:189:1
Backtrace and bonus delay_span_bug ICE
thread 'rustc' panicked at 'DefId(2:3419 ~ core[0032]::marker::Sized) does not have a "type_of"', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:189:1
stack backtrace:
   0:        0x10e043f12 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1b594e9bcc0c6898
   1:        0x10e0a24ba - core::fmt::write::h7c6f83d024852aa9
   2:        0x10e035fec - std::io::Write::write_fmt::h97d969d4aea1606d
   3:        0x10e043cda - std::sys_common::backtrace::print::h562dadf6028256bf
   4:        0x10e0470b6 - std::panicking::default_hook::{{closure}}::hee367e24075678e4
   5:        0x10e046e07 - std::panicking::default_hook::hcce3553a0befadd1
   6:        0x11b442f3d - rustc_driver[f93b8a3886cc8b65]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x10e0478b5 - std::panicking::rust_panic_with_hook::h4f6feaafc55c56a2
   8:        0x10e047643 - std::panicking::begin_panic_handler::{{closure}}::hde5e87cf8416de78
   9:        0x10e0443a8 - std::sys_common::backtrace::__rust_end_short_backtrace::h06c292cffdb0bbc3
  10:        0x10e04730d - _rust_begin_unwind
  11:        0x10e0cf053 - core::panicking::panic_fmt::he51d66482c616f28
  12:        0x11f41c988 - rustc_metadata[f1fb213638f5db03]::rmeta::decoder::cstore_impl::provide_extern::type_of::{closure#1}
  13:        0x11f41c896 - rustc_metadata[f1fb213638f5db03]::rmeta::decoder::cstore_impl::provide_extern::type_of
  14:        0x11ec57c95 - rustc_query_system[38b064a260926677]::query::plumbing::try_execute_query::<rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt, rustc_query_system[38b064a260926677]::query::caches::DefaultCache<rustc_span[50ad8565b2f1bbfb]::def_id::DefId, rustc_middle[85091bb6846d2e9a]::ty::Ty>>
  15:        0x11ed3be24 - rustc_query_system[38b064a260926677]::query::plumbing::get_query::<rustc_query_impl[fcf86a589ba14889]::queries::type_of, rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt>
  16:        0x11f9b72f2 - <rustc_infer[f3d18b0d0d8e0a5e]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[fbfc9000665c881]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
  17:        0x11f9a6256 - <rustc_infer[f3d18b0d0d8e0a5e]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[fbfc9000665c881]::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors
  18:        0x11dcb037f - <rustc_hir_typeck[bdb15a1f3923c127]::fn_ctxt::FnCtxt>::select_all_obligations_or_error
  19:        0x11dd8ab93 - <rustc_hir_typeck[bdb15a1f3923c127]::inherited::InheritedBuilder>::enter::<rustc_hir_typeck[bdb15a1f3923c127]::typeck_with_fallback<rustc_hir_typeck[bdb15a1f3923c127]::typeck::{closure#0}>::{closure#0}::{closure#1}, &rustc_middle[85091bb6846d2e9a]::ty::context::TypeckResults>
  20:        0x11dd23ffa - rustc_hir_typeck[bdb15a1f3923c127]::typeck
  21:        0x11ec36159 - rustc_query_system[38b064a260926677]::query::plumbing::try_execute_query::<rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt, rustc_query_system[38b064a260926677]::query::caches::DefaultCache<rustc_span[50ad8565b2f1bbfb]::def_id::LocalDefId, &rustc_middle[85091bb6846d2e9a]::ty::context::TypeckResults>>
  22:        0x11ed3bb8c - rustc_query_system[38b064a260926677]::query::plumbing::get_query::<rustc_query_impl[fcf86a589ba14889]::queries::typeck, rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt>
  23:        0x11ddb376c - std[38dd6138ba148cb2]::panicking::try::<(), core[322641b34a183a]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[2eed7d44fa552923]::sync::par_for_each_in<&[rustc_span[50ad8565b2f1bbfb]::def_id::LocalDefId], <rustc_middle[85091bb6846d2e9a]::hir::map::Map>::par_body_owners<rustc_hir_typeck[bdb15a1f3923c127]::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
  24:        0x11ddb34a5 - rustc_data_structures[2eed7d44fa552923]::sync::par_for_each_in::<&[rustc_span[50ad8565b2f1bbfb]::def_id::LocalDefId], <rustc_middle[85091bb6846d2e9a]::hir::map::Map>::par_body_owners<rustc_hir_typeck[bdb15a1f3923c127]::typeck_item_bodies::{closure#0}>::{closure#0}>
  25:        0x11dd2377d - rustc_hir_typeck[bdb15a1f3923c127]::typeck_item_bodies
  26:        0x11eccfdb9 - rustc_query_system[38b064a260926677]::query::plumbing::try_execute_query::<rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt, rustc_query_system[38b064a260926677]::query::caches::DefaultCache<(), ()>>
  27:        0x11ed30339 - rustc_query_system[38b064a260926677]::query::plumbing::get_query::<rustc_query_impl[fcf86a589ba14889]::queries::typeck_item_bodies, rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt>
  28:        0x11de9c3f4 - <rustc_session[304ed9bc7c986c94]::session::Session>::time::<(), rustc_hir_analysis[e85e3b9a54dc24a9]::check_crate::{closure#7}>
  29:        0x11dfbb5df - rustc_hir_analysis[e85e3b9a54dc24a9]::check_crate
  30:        0x11b5063ba - rustc_interface[bab52cec3fba6e57]::passes::analysis
  31:        0x11ecc1b7c - rustc_query_system[38b064a260926677]::query::plumbing::try_execute_query::<rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt, rustc_query_system[38b064a260926677]::query::caches::DefaultCache<(), core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>>
  32:        0x11ed3bf39 - rustc_query_system[38b064a260926677]::query::plumbing::get_query::<rustc_query_impl[fcf86a589ba14889]::queries::analysis, rustc_query_impl[fcf86a589ba14889]::plumbing::QueryCtxt>
  33:        0x11b3d2416 - <rustc_interface[bab52cec3fba6e57]::passes::QueryContext>::enter::<rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>
  34:        0x11b41668d - rustc_span[50ad8565b2f1bbfb]::with_source_map::<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  35:        0x11b4065bc - <scoped_tls[5d80669e9829205e]::ScopedKey<rustc_span[50ad8565b2f1bbfb]::SessionGlobals>>::set::<rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>
  36:        0x11b3d537a - std[38dd6138ba148cb2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[bab52cec3fba6e57]::util::run_in_thread_pool_with_globals<rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>
  37:        0x11b3bbb4b - <<std[38dd6138ba148cb2]::thread::Builder>::spawn_unchecked_<rustc_interface[bab52cec3fba6e57]::util::run_in_thread_pool_with_globals<rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>::{closure#1} as core[322641b34a183a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  38:        0x10e050967 - std::sys::unix::thread::Thread::new::thread_start::hae9a83a2ac729f3b
  39:     0x7ff80d84d4e1 - __pthread_start

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.67.0-nightly (e75aab045 2022-11-09) running on x86_64-apple-darwin

query stack during panic:
#0 [type_of] computing type of `core::marker::Sized`
#1 [typeck] type-checking `main`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at    0: std::backtrace::Backtrace::create
             1: std::backtrace::Backtrace::force_capture
             2: <rustc_errors::Handler>::delay_good_path_bug::<&str>
             3: rustc_middle::ty::print::pretty::trimmed_def_paths
             4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::ArenaCache<(), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>>
             5: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt>
             6: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::Printer>::print_def_path
             7: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::Printer>::path_generic_args::<<rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::Printer>::default_print_def_path::{closure#2}>
             8: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::Printer>::print_def_path
             9: <rustc_middle::ty::TraitPredicate as rustc_middle::ty::print::Print<rustc_middle::ty::print::pretty::FmtPrinter>>::print
            10: <rustc_middle::ty::PredicateKind as rustc_middle::ty::print::Print<rustc_middle::ty::print::pretty::FmtPrinter>>::print
            11: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder::<rustc_middle::ty::PredicateKind>
            12: <rustc_middle::ty::Predicate as core::fmt::Display>::fmt
            13: core::fmt::write
            14: alloc::fmt::format::format_inner
            15: <rustc_infer::infer::error_reporting::TypeErrCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
            16: <rustc_infer::infer::error_reporting::TypeErrCtxt as rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::select_all_obligations_or_error
            18: <rustc_hir_typeck::inherited::InheritedBuilder>::enter::<rustc_hir_typeck::typeck_with_fallback<rustc_hir_typeck::typeck::{closure#0}>::{closure#0}::{closure#1}, &rustc_middle::ty::context::TypeckResults>
            19: rustc_hir_typeck::typeck
            20: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
            21: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck, rustc_query_impl::plumbing::QueryCtxt>
            22: std::panicking::try::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::par_for_each_in<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_hir_typeck::typeck_item_bodies::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}>>
            23: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_hir_typeck::typeck_item_bodies::{closure#0}>::{closure#0}>
            24: rustc_hir_typeck::typeck_item_bodies
            25: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
            26: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
            27: <rustc_session::session::Session>::time::<(), rustc_hir_analysis::check_crate::{closure#7}>
            28: rustc_hir_analysis::check_crate
            29: rustc_interface::passes::analysis
            30: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
            31: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
            32: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            33: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
            34: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            35: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
            36: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            37: std::sys::unix::thread::Thread::new::thread_start
            38: __pthread_start


thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1585:13
stack backtrace:
   0:        0x10e043f12 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1b594e9bcc0c6898
   1:        0x10e0a24ba - core::fmt::write::h7c6f83d024852aa9
   2:        0x10e035fec - std::io::Write::write_fmt::h97d969d4aea1606d
   3:        0x10e043cda - std::sys_common::backtrace::print::h562dadf6028256bf
   4:        0x10e0470b6 - std::panicking::default_hook::{{closure}}::hee367e24075678e4
   5:        0x10e046e07 - std::panicking::default_hook::hcce3553a0befadd1
   6:        0x11b442f3d - rustc_driver[f93b8a3886cc8b65]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x10e0478b5 - std::panicking::rust_panic_with_hook::h4f6feaafc55c56a2
   8:        0x11fe582c7 - std[38dd6138ba148cb2]::panicking::begin_panic::<rustc_errors[ef89fc2f19a46f90]::ExplicitBug>::{closure#0}
   9:        0x11fe562f9 - std[38dd6138ba148cb2]::sys_common::backtrace::__rust_end_short_backtrace::<std[38dd6138ba148cb2]::panicking::begin_panic<rustc_errors[ef89fc2f19a46f90]::ExplicitBug>::{closure#0}, !>
  10:        0x120220e59 - std[38dd6138ba148cb2]::panicking::begin_panic::<rustc_errors[ef89fc2f19a46f90]::ExplicitBug>
  11:        0x11fe485c9 - std[38dd6138ba148cb2]::panic::panic_any::<rustc_errors[ef89fc2f19a46f90]::ExplicitBug>
  12:        0x11fe4bb32 - <rustc_errors[ef89fc2f19a46f90]::HandlerInner as core[322641b34a183a]::ops::drop::Drop>::drop
  13:        0x11b3c4b3a - core[322641b34a183a]::ptr::drop_in_place::<rustc_session[304ed9bc7c986c94]::parse::ParseSess>
  14:        0x11b3c62ab - core[322641b34a183a]::ptr::drop_in_place::<rustc_session[304ed9bc7c986c94]::session::Session>
  15:        0x11b42c1be - core[322641b34a183a]::ptr::drop_in_place::<rustc_interface[bab52cec3fba6e57]::interface::Compiler>
  16:        0x11b416b7f - rustc_span[50ad8565b2f1bbfb]::with_source_map::<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  17:        0x11b4065bc - <scoped_tls[5d80669e9829205e]::ScopedKey<rustc_span[50ad8565b2f1bbfb]::SessionGlobals>>::set::<rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>
  18:        0x11b3d537a - std[38dd6138ba148cb2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[bab52cec3fba6e57]::util::run_in_thread_pool_with_globals<rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>
  19:        0x11b3bbb4b - <<std[38dd6138ba148cb2]::thread::Builder>::spawn_unchecked_<rustc_interface[bab52cec3fba6e57]::util::run_in_thread_pool_with_globals<rustc_interface[bab52cec3fba6e57]::interface::run_compiler<core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>, rustc_driver[f93b8a3886cc8b65]::run_compiler::{closure#1}>::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[322641b34a183a]::result::Result<(), rustc_errors[ef89fc2f19a46f90]::ErrorGuaranteed>>::{closure#1} as core[322641b34a183a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  20:        0x10e050967 - std::sys::unix::thread::Thread::new::thread_start::hae9a83a2ac729f3b
  21:     0x7ff80d84d4e1 - __pthread_start

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.67.0-nightly (e75aab045 2022-11-09) running on x86_64-apple-darwin

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
Abort trap: 6

Regression

Regression in nightly-2022-10-06, more specifically in rollup dd8c3a8.

Likely from #102670, which modified this error message.

Error message prior to the change
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
  --> uit.rs:10:5
   |
4  |     fn f() {}
   |     --------- `Foo::f` defined here
...
10 |     Foo::f();
   |     ^^^^^^ cannot call associated function of trait
   |
help: use the fully-qualified path to the only available implementation
   |
10 |     <::marker::Sized as Foo>::f();
   |     +++++++++++++++++++    +

error: aborting due to previous error

Version

rustc 1.67.0-nightly (e75aab045 2022-11-09)
binary: rustc
commit-hash: e75aab045fc476f176a58c408f6b06f0e275c6e1
commit-date: 2022-11-09
host: x86_64-apple-darwin
release: 1.67.0-nightly
LLVM version: 15.0.4
@jruderman jruderman added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 12, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 14, 2022
…f-id, r=estebank

Use impl's def id when calculating type to specify in UFCS

Fixes rust-lang#104327
Fixes rust-lang#104328

Also addresses rust-lang#102670 (comment)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 14, 2022
…f-id, r=estebank

Use impl's def id when calculating type to specify in UFCS

Fixes rust-lang#104327
Fixes rust-lang#104328

Also addresses rust-lang#102670 (comment)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 15, 2022
…f-id, r=estebank

Use impl's def id when calculating type to specify in UFCS

Fixes rust-lang#104327
Fixes rust-lang#104328

Also addresses rust-lang#102670 (comment)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 15, 2022
…f-id, r=estebank

Use impl's def id when calculating type to specify in UFCS

Fixes rust-lang#104327
Fixes rust-lang#104328

Also addresses rust-lang#102670 (comment)
@bors bors closed this as completed in 39b2a41 Dec 16, 2022
Aaron1011 pushed a commit to Aaron1011/rust that referenced this issue Jan 6, 2023
…id, r=estebank

Use impl's def id when calculating type to specify in UFCS

Fixes rust-lang#104327
Fixes rust-lang#104328

Also addresses rust-lang#102670 (comment)
@compiler-errors compiler-errors self-assigned this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants