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: assertion failed: constant / lifetime with effects and try_trait #119717

Closed
matthiaskrgr opened this issue Jan 7, 2024 · 2 comments · Fixed by #120639
Closed

ice: assertion failed: constant / lifetime with effects and try_trait #119717

matthiaskrgr opened this issue Jan 7, 2024 · 2 comments · Fixed by #120639
Labels
C-bug Category: This is a bug. F-const_trait_impl `#![feature(const_trait_impl)]` F-effects `#![feature(effects)]` 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

snippet:

#![feature(const_trait_impl, effects)]

use std::ops::{FromResidual, Try};

impl const FromResidual for T {
    fn from_residual(t: T) -> _ {
        t
    }
}

Version information

rustc 1.77.0-nightly (75c68cfd2 2024-01-07)
binary: rustc
commit-hash: 75c68cfd2b9870f2953b62d250bd7d0564a7b56d
commit-date: 2024-01-07
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6

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

Program output

error[E0412]: cannot find type `T` in this scope
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:5:29
  |
5 | impl const FromResidual for T {
  |                             ^ not found in this scope

error[E0412]: cannot find type `T` in this scope
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:6:25
  |
6 |     fn from_residual(t: T) -> _ {
  |                         ^ not found in this scope

warning: unused import: `Try`
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:3:30
  |
3 | use std::ops::{FromResidual, Try};
  |                              ^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:9:2
  |
9 | }
  |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs`

error[E0658]: use of unstable library feature 'try_trait_v2'
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:3:16
  |
3 | use std::ops::{FromResidual, Try};
  |                ^^^^^^^^^^^^
  |
  = note: see issue #84277 <https://github.com/rust-lang/rust/issues/84277> for more information
  = help: add `#![feature(try_trait_v2)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'try_trait_v2'
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:3:30
  |
3 | use std::ops::{FromResidual, Try};
  |                              ^^^
  |
  = note: see issue #84277 <https://github.com/rust-lang/rust/issues/84277> for more information
  = help: add `#![feature(try_trait_v2)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'try_trait_v2'
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:6:5
  |
6 | /     fn from_residual(t: T) -> _ {
7 | |         t
8 | |     }
  | |_____^
  |
  = note: see issue #84277 <https://github.com/rust-lang/rust/issues/84277> for more information
  = help: add `#![feature(try_trait_v2)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'try_trait_v2'
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:5:12
  |
5 | impl const FromResidual for T {
  |            ^^^^^^^^^^^^
  |
  = note: see issue #84277 <https://github.com/rust-lang/rust/issues/84277> for more information
  = help: add `#![feature(try_trait_v2)]` to the crate attributes to enable

error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
 --> /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:5:12
  |
5 | impl const FromResidual for T {
  |            ^^^^^^^^^^^^
  |
  = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
  = note: adding a non-const method body in the future would be a breaking change

thread 'rustc' panicked at compiler/rustc_hir_analysis/src/astconv/generics.rs:377:25:
assertion `left == right` failed
  left: "constant"
 right: "lifetime"
stack backtrace:
   0:     0x7faa8b98c7e6 - std::backtrace_rs::backtrace::libunwind::trace::h77800003d5e1d475
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7faa8b98c7e6 - std::backtrace_rs::backtrace::trace_unsynchronized::h053be484c7eba922
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7faa8b98c7e6 - std::sys_common::backtrace::_print_fmt::h658f0ed17c0b78d9
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7faa8b98c7e6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h92f7276dc2d1ad88
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7faa8b9deed0 - core::fmt::rt::Argument::fmt::heed5d96f67f8a94e
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/core/src/fmt/rt.rs:142:9
   5:     0x7faa8b9deed0 - core::fmt::write::hb0a14a1b109d343e
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/core/src/fmt/mod.rs:1120:17
   6:     0x7faa8b98014f - std::io::Write::write_fmt::hb68419aa79b5d241
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/io/mod.rs:1810:15
   7:     0x7faa8b98c5c4 - std::sys_common::backtrace::_print::h2515a5f3f70c3f2a
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7faa8b98c5c4 - std::sys_common::backtrace::print::haa99668665f11fc1
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7faa8b98f357 - std::panicking::default_hook::{{closure}}::h98d80deda6602b54
  10:     0x7faa8b98f0b9 - std::panicking::default_hook::h01558a8bbd5d1c0b
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/panicking.rs:292:9
  11:     0x7faa8e75093c - std[ca913780aff877b3]::panicking::update_hook::<alloc[6aabbde17010a607]::boxed::Box<rustc_driver_impl[c8d6e38be153bd2e]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7faa8b98faa6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1171429379e58ebd
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/alloc/src/boxed.rs:2030:9
  13:     0x7faa8b98faa6 - std::panicking::rust_panic_with_hook::he8cd11bc79b74e48
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/panicking.rs:783:13
  14:     0x7faa8b98f7f2 - std::panicking::begin_panic_handler::{{closure}}::he1868b3475576648
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/panicking.rs:657:13
  15:     0x7faa8b98cce6 - std::sys_common::backtrace::__rust_end_short_backtrace::h9210389720f5c16a
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7faa8b98f550 - rust_begin_unwind
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/panicking.rs:645:5
  17:     0x7faa8b9db5d5 - core::panicking::panic_fmt::hfbd09a125111b8b4
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/core/src/panicking.rs:72:14
  18:     0x7faa8b9dbb6b - core::panicking::assert_failed_inner::ha427bb62c1496cc3
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/core/src/panicking.rs:342:17
  19:     0x7faa8e8125eb - core[db2dbba8ad13fc6d]::panicking::assert_failed::<&str, &str>
  20:     0x7faa9036f69d - <dyn rustc_hir_analysis[e387dd78e074a169]::astconv::AstConv>::create_args_for_ast_path
  21:     0x7faa9036d26a - <dyn rustc_hir_analysis[e387dd78e074a169]::astconv::AstConv>::instantiate_mono_trait_ref
  22:     0x7faa8e87aa36 - <dyn rustc_hir_analysis[e387dd78e074a169]::astconv::AstConv>::suggest_trait_fn_ty_for_impl_fn_infer
  23:     0x7faa8fbef222 - <dyn rustc_hir_analysis[e387dd78e074a169]::astconv::AstConv>::ty_of_fn
  24:     0x7faa8fbecce0 - rustc_hir_analysis[e387dd78e074a169]::collect::fn_sig
  25:     0x7faa8fbe6045 - rustc_query_impl[d71d27d8d4fd2043]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d71d27d8d4fd2043]::query_impl::fn_sig::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fc3d6de4885c956b]::query::erase::Erased<[u8; 24usize]>>
  26:     0x7faa8fbe6015 - <rustc_query_impl[d71d27d8d4fd2043]::query_impl::fn_sig::dynamic_query::{closure#2} as core[db2dbba8ad13fc6d]::ops::function::FnOnce<(rustc_middle[fc3d6de4885c956b]::ty::context::TyCtxt, rustc_span[5c4821f8b4a403f8]::def_id::DefId)>>::call_once
  27:     0x7faa8fbe5653 - rustc_query_system[af0d53eaca50a21]::query::plumbing::try_execute_query::<rustc_query_impl[d71d27d8d4fd2043]::DynamicConfig<rustc_query_system[af0d53eaca50a21]::query::caches::DefaultCache<rustc_span[5c4821f8b4a403f8]::def_id::DefId, rustc_middle[fc3d6de4885c956b]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[d71d27d8d4fd2043]::plumbing::QueryCtxt, false>
  28:     0x7faa8fbe5075 - rustc_query_impl[d71d27d8d4fd2043]::query_impl::fn_sig::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7faa8fd581bb - <rustc_hir_analysis[e387dd78e074a169]::collect::CollectItemTypesVisitor as rustc_hir[149574241a95a1a8]::intravisit::Visitor>::visit_impl_item
  30:     0x7faa8febc04d - rustc_hir_analysis[e387dd78e074a169]::collect::collect_mod_item_types
  31:     0x7faa8febbf91 - rustc_query_impl[d71d27d8d4fd2043]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d71d27d8d4fd2043]::query_impl::collect_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fc3d6de4885c956b]::query::erase::Erased<[u8; 0usize]>>
  32:     0x7faa90614ecf - rustc_query_system[af0d53eaca50a21]::query::plumbing::try_execute_query::<rustc_query_impl[d71d27d8d4fd2043]::DynamicConfig<rustc_query_system[af0d53eaca50a21]::query::caches::DefaultCache<rustc_span[5c4821f8b4a403f8]::def_id::LocalModDefId, rustc_middle[fc3d6de4885c956b]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[d71d27d8d4fd2043]::plumbing::QueryCtxt, false>
  33:     0x7faa90614a03 - rustc_query_impl[d71d27d8d4fd2043]::query_impl::collect_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7faa8fbf323d - rustc_hir_analysis[e387dd78e074a169]::check_crate
  35:     0x7faa9060bbd9 - rustc_interface[1bd61175f6644bbf]::passes::analysis
  36:     0x7faa9060b81f - rustc_query_impl[d71d27d8d4fd2043]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d71d27d8d4fd2043]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[fc3d6de4885c956b]::query::erase::Erased<[u8; 1usize]>>
  37:     0x7faa909a79a4 - rustc_query_system[af0d53eaca50a21]::query::plumbing::try_execute_query::<rustc_query_impl[d71d27d8d4fd2043]::DynamicConfig<rustc_query_system[af0d53eaca50a21]::query::caches::SingleCache<rustc_middle[fc3d6de4885c956b]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[d71d27d8d4fd2043]::plumbing::QueryCtxt, false>
  38:     0x7faa909a7795 - rustc_query_impl[d71d27d8d4fd2043]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  39:     0x7faa906fb575 - rustc_interface[1bd61175f6644bbf]::interface::run_compiler::<core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>, rustc_driver_impl[c8d6e38be153bd2e]::run_compiler::{closure#0}>::{closure#0}
  40:     0x7faa909cc486 - std[ca913780aff877b3]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1bd61175f6644bbf]::util::run_in_thread_with_globals<rustc_interface[1bd61175f6644bbf]::util::run_in_thread_pool_with_globals<rustc_interface[1bd61175f6644bbf]::interface::run_compiler<core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>, rustc_driver_impl[c8d6e38be153bd2e]::run_compiler::{closure#0}>::{closure#0}, core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>>::{closure#0}, core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>>
  41:     0x7faa909cc2b3 - <<std[ca913780aff877b3]::thread::Builder>::spawn_unchecked_<rustc_interface[1bd61175f6644bbf]::util::run_in_thread_with_globals<rustc_interface[1bd61175f6644bbf]::util::run_in_thread_pool_with_globals<rustc_interface[1bd61175f6644bbf]::interface::run_compiler<core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>, rustc_driver_impl[c8d6e38be153bd2e]::run_compiler::{closure#0}>::{closure#0}, core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>>::{closure#0}, core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[db2dbba8ad13fc6d]::result::Result<(), rustc_span[5c4821f8b4a403f8]::ErrorGuaranteed>>::{closure#1} as core[db2dbba8ad13fc6d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x7faa8b9999d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h531f62f3337edeaa
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/alloc/src/boxed.rs:2016:9
  43:     0x7faa8b9999d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8927a97a093d165e
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/alloc/src/boxed.rs:2016:9
  44:     0x7faa8b9999d5 - std::sys::unix::thread::Thread::new::thread_start::h95607854405756e7
                               at /rustc/75c68cfd2b9870f2953b62d250bd7d0564a7b56d/library/std/src/sys/unix/thread.rs:108:17
  45:     0x7faa8b7859eb - <unknown>
  46:     0x7faa8b8097cc - <unknown>
  47:                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: rustc 1.77.0-nightly (75c68cfd2 2024-01-07) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [fn_sig] computing function signature of `<impl at /tmp/icemaker_global_tempdir.lbZhrjbfGw3A/rustc_testrunner_tmpdir_reporting.YccQD9hrVX62/mvce.rs:5:1: 5:30>::from_residual`
#1 [collect_mod_item_types] collecting item types in top-level module
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 8 previous errors; 1 warning emitted

Some errors have detailed explanations: E0412, E0601, E0658.
For more information about an error, try `rustc --explain E0412`.

@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. F-const_trait_impl `#![feature(const_trait_impl)]` F-try_trait_v2 Tracking issue for RFC#3058 F-effects `#![feature(effects)]` labels Jan 7, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 7, 2024
@compiler-errors compiler-errors removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 7, 2024
@matthiaskrgr matthiaskrgr removed the F-try_trait_v2 Tracking issue for RFC#3058 label Jan 17, 2024
@matthiaskrgr
Copy link
Member Author

matthiaskrgr commented Jan 17, 2024

Another one that doesnt require try trait

#![feature(effects)]
impl const Drop for Panic {
    const fn x(x: T) -> _ {}
}

ices since #113210 presumably

thread 'rustc' panicked at compiler/rustc_hir_analysis/src/astconv/generics.rs:377:25:
assertion `left == right` failed
  left: "constant"
 right: "lifetime"
stack backtrace:
   0:     0x7f527118c806 - std::backtrace_rs::backtrace::libunwind::trace::ha01170f221d1582e
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f527118c806 - std::backtrace_rs::backtrace::trace_unsynchronized::h7bf73eebd8e9e0d0
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f527118c806 - std::sys_common::backtrace::_print_fmt::h77ea322553b76a7e
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f527118c806 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h969e1c98d856cf21
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f52711dee00 - core::fmt::rt::Argument::fmt::h42e2e630aae6c56f
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/core/src/fmt/rt.rs:142:9
   5:     0x7f52711dee00 - core::fmt::write::heafe82d09f904898
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f527118013f - std::io::Write::write_fmt::h850aed7df0da11d2
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/io/mod.rs:1810:15
   7:     0x7f527118c5e4 - std::sys_common::backtrace::_print::h7ede50b4b70fd04c
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f527118c5e4 - std::sys_common::backtrace::print::hfc62bae2ea4aa12e
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f527118f377 - std::panicking::default_hook::{{closure}}::h1085a3f5762a8db7
  10:     0x7f527118f0d9 - std::panicking::default_hook::h1ad90d9c3dd5db68
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/panicking.rs:292:9
  11:     0x7f5273f7671c - std[1da247c91cf6dce6]::panicking::update_hook::<alloc[e56d0959c422b7e0]::boxed::Box<rustc_driver_impl[1daeda9eb381db5f]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f527118fac6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h0d16d6c3b8f74418
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/alloc/src/boxed.rs:2030:9
  13:     0x7f527118fac6 - std::panicking::rust_panic_with_hook::hdf29dd587202a0f5
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/panicking.rs:785:13
  14:     0x7f527118f812 - std::panicking::begin_panic_handler::{{closure}}::h37d1aacc08140715
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/panicking.rs:659:13
  15:     0x7f527118cd06 - std::sys_common::backtrace::__rust_end_short_backtrace::h2d42407a434fe0cd
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f527118f564 - rust_begin_unwind
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/panicking.rs:647:5
  17:     0x7f52711db505 - core::panicking::panic_fmt::hdd827d1cee1530bd
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/core/src/panicking.rs:72:14
  18:     0x7f52711dba9b - core::panicking::assert_failed_inner::hb3461e44c963e516
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/core/src/panicking.rs:342:17
  19:     0x7f52740387cb - core[aa434ffebce5b8fa]::panicking::assert_failed::<&str, &str>
  20:     0x7f5275d078df - <dyn rustc_hir_analysis[7e179018dc102988]::astconv::AstConv>::create_args_for_ast_path
  21:     0x7f5275d04174 - <dyn rustc_hir_analysis[7e179018dc102988]::astconv::AstConv>::instantiate_mono_trait_ref
  22:     0x7f52740a1886 - <dyn rustc_hir_analysis[7e179018dc102988]::astconv::AstConv>::suggest_trait_fn_ty_for_impl_fn_infer
  23:     0x7f527540119f - <dyn rustc_hir_analysis[7e179018dc102988]::astconv::AstConv>::ty_of_fn
  24:     0x7f52753fec2b - rustc_hir_analysis[7e179018dc102988]::collect::fn_sig
  25:     0x7f52753c36b9 - rustc_query_impl[be13b8f2c6383f5d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[be13b8f2c6383f5d]::query_impl::fn_sig::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2d050e635fea1b07]::query::erase::Erased<[u8; 24usize]>>
  26:     0x7f52753c3689 - <rustc_query_impl[be13b8f2c6383f5d]::query_impl::fn_sig::dynamic_query::{closure#2} as core[aa434ffebce5b8fa]::ops::function::FnOnce<(rustc_middle[2d050e635fea1b07]::ty::context::TyCtxt, rustc_span[b4fe891d2bf9e8ba]::def_id::DefId)>>::call_once
  27:     0x7f52753c3c7f - rustc_query_system[8db8d0664677b7fb]::query::plumbing::try_execute_query::<rustc_query_impl[be13b8f2c6383f5d]::DynamicConfig<rustc_query_system[8db8d0664677b7fb]::query::caches::DefIdCache<rustc_middle[2d050e635fea1b07]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[be13b8f2c6383f5d]::plumbing::QueryCtxt, false>
  28:     0x7f52753c3639 - rustc_query_impl[be13b8f2c6383f5d]::query_impl::fn_sig::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7f52753fbd83 - <rustc_hir_analysis[7e179018dc102988]::collect::CollectItemTypesVisitor as rustc_hir[fb850ae0bf4bdba6]::intravisit::Visitor>::visit_impl_item
  30:     0x7f52753f4d39 - rustc_hir_analysis[7e179018dc102988]::collect::collect_mod_item_types
  31:     0x7f52753f4c79 - rustc_query_impl[be13b8f2c6383f5d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[be13b8f2c6383f5d]::query_impl::collect_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2d050e635fea1b07]::query::erase::Erased<[u8; 0usize]>>
  32:     0x7f5275edd4cf - rustc_query_system[8db8d0664677b7fb]::query::plumbing::try_execute_query::<rustc_query_impl[be13b8f2c6383f5d]::DynamicConfig<rustc_query_system[8db8d0664677b7fb]::query::caches::DefaultCache<rustc_span[b4fe891d2bf9e8ba]::def_id::LocalModDefId, rustc_middle[2d050e635fea1b07]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[be13b8f2c6383f5d]::plumbing::QueryCtxt, false>
  33:     0x7f5275edd003 - rustc_query_impl[be13b8f2c6383f5d]::query_impl::collect_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7f52754a144e - rustc_hir_analysis[7e179018dc102988]::check_crate
  35:     0x7f5275c1e852 - rustc_interface[1d63f5ea980786ac]::passes::analysis
  36:     0x7f5275c1e49f - rustc_query_impl[be13b8f2c6383f5d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[be13b8f2c6383f5d]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2d050e635fea1b07]::query::erase::Erased<[u8; 1usize]>>
  37:     0x7f5275c1cdf2 - rustc_query_system[8db8d0664677b7fb]::query::plumbing::try_execute_query::<rustc_query_impl[be13b8f2c6383f5d]::DynamicConfig<rustc_query_system[8db8d0664677b7fb]::query::caches::SingleCache<rustc_middle[2d050e635fea1b07]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[be13b8f2c6383f5d]::plumbing::QueryCtxt, false>
  38:     0x7f5275c1cbf9 - rustc_query_impl[be13b8f2c6383f5d]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  39:     0x7f5275f94c6d - rustc_interface[1d63f5ea980786ac]::interface::run_compiler::<core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>, rustc_driver_impl[1daeda9eb381db5f]::run_compiler::{closure#0}>::{closure#0}
  40:     0x7f52761c0306 - std[1da247c91cf6dce6]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1d63f5ea980786ac]::util::run_in_thread_with_globals<rustc_interface[1d63f5ea980786ac]::util::run_in_thread_pool_with_globals<rustc_interface[1d63f5ea980786ac]::interface::run_compiler<core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>, rustc_driver_impl[1daeda9eb381db5f]::run_compiler::{closure#0}>::{closure#0}, core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>>::{closure#0}, core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>>
  41:     0x7f52761c0133 - <<std[1da247c91cf6dce6]::thread::Builder>::spawn_unchecked_<rustc_interface[1d63f5ea980786ac]::util::run_in_thread_with_globals<rustc_interface[1d63f5ea980786ac]::util::run_in_thread_pool_with_globals<rustc_interface[1d63f5ea980786ac]::interface::run_compiler<core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>, rustc_driver_impl[1daeda9eb381db5f]::run_compiler::{closure#0}>::{closure#0}, core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>>::{closure#0}, core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[aa434ffebce5b8fa]::result::Result<(), rustc_span[b4fe891d2bf9e8ba]::ErrorGuaranteed>>::{closure#1} as core[aa434ffebce5b8fa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x7f52711993b5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h60369ba8348f2336
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/alloc/src/boxed.rs:2016:9
  43:     0x7f52711993b5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hdc7f7433e4255761
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/alloc/src/boxed.rs:2016:9
  44:     0x7f52711993b5 - std::sys::pal::unix::thread::Thread::new::thread_start::hce3beac85f35b55d
                               at /rustc/098d4fd74c078b12bfc2e9438a2a04bc18b393bc/library/std/src/sys/pal/unix/thread.rs:108:17
  45:     0x7f5270f859eb - <unknown>
  46:     0x7f52710097cc - <unknown>
  47:                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 attach the file at `/tmp/im/rustc-ice-2024-01-17T05_23_33-926326.txt` to your bug report

query stack during panic:
#0 [fn_sig] computing function signature of `<impl at a.rs:2:1: 2:26>::x`
#1 [collect_mod_item_types] collecting item types in top-level module
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 7 previous errors

Some errors have detailed explanations: E0379, E0407, E0412, E0601, E0658.
For more information about an error, try `rustc --explain E0379`.

@matthiaskrgr
Copy link
Member Author

code was moved: compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs

@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 15, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 28, 2024
…garing, r=oli-obk

Implement new effects desugaring

cc `@rust-lang/project-const-traits.` Will write down notes once I have finished.

* [x] See if we want `T: Tr` to desugar into `T: Tr, T::Effects: Compat<true>`
* [x] Fix ICEs on `type Assoc: ~const Tr` and `type Assoc<T: ~const Tr>`
* [ ] add types and traits to minicore test
* [ ] update rustc-dev-guide

Fixes rust-lang#119717
Fixes rust-lang#123664
Fixes rust-lang#124857
Fixes rust-lang#126148
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 29, 2024
…ring, r=oli-obk

Implement new effects desugaring

cc `@rust-lang/project-const-traits.` Will write down notes once I have finished.

* [x] See if we want `T: Tr` to desugar into `T: Tr, T::Effects: Compat<true>`
* [x] Fix ICEs on `type Assoc: ~const Tr` and `type Assoc<T: ~const Tr>`
* [ ] add types and traits to minicore test
* [ ] update rustc-dev-guide

Fixes rust-lang#119717
Fixes rust-lang#123664
Fixes rust-lang#124857
Fixes rust-lang#126148
@bors bors closed this as completed in ba1d7f4 Jun 29, 2024
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 11, 2024
…ring, r=oli-obk

Implement new effects desugaring

cc `@rust-lang/project-const-traits.` Will write down notes once I have finished.

* [x] See if we want `T: Tr` to desugar into `T: Tr, T::Effects: Compat<true>`
* [x] Fix ICEs on `type Assoc: ~const Tr` and `type Assoc<T: ~const Tr>`
* [ ] add types and traits to minicore test
* [ ] update rustc-dev-guide

Fixes rust-lang#119717
Fixes rust-lang#123664
Fixes rust-lang#124857
Fixes rust-lang#126148
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-const_trait_impl `#![feature(const_trait_impl)]` F-effects `#![feature(effects)]` 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

Successfully merging a pull request may close this issue.

3 participants