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: effects, const_trait: assertion failed: constant / lifetime #119078

Closed
cushionbadak opened this issue Dec 18, 2023 · 3 comments
Closed

ice: effects, const_trait: assertion failed: constant / lifetime #119078

cushionbadak opened this issue Dec 18, 2023 · 3 comments
Labels
C-bug Category: This is a bug. F-effects `#![feature(effects)]` 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

@cushionbadak
Copy link

Same assertion violation appeared at #117244, but has different query stack.

Found this ICE using fuzzing method (with tree-splicer mutator), seed pool is constructed with rust/tests/ui/ and rust-clippy/tests/ui/.

Code

(manual-reduced, call it qwer.rs)

#![feature(effects)]

trait Foo { }

#[const_trait]
trait Bar: ~const Foo {}

(original)

#![feature(const_trait_impl, effects)]

#[TokenStream]
trait Foo { }

#[const_trait]
trait Bar: ~const Foo {}

struct S;
impl const Foo for S {
    fn a(&self) {}
}

impl const Bar for S {}

extern "C" fn foo<T: ~const Bar>(t: &T) {
    t.a();
}

const _: () = foo(&S);

fn main() {}

Meta

/root/.cargo/bin/rustc --version --verbose:

rustc 1.76.0-nightly (6a6287132 2023-12-17)
binary: rustc
commit-hash: 6a62871320e262661bb1a0ea7f8aec9d3abeddf2
commit-date: 2023-12-17
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.6

Command

/root/.cargo/bin/rustc qwer.rs -Zno-codegen

Error output

Backtrace

error[E0658]: const trait impls are experimental
 --> qwer.rs:6:12
  |
6 | trait Bar: ~const Foo {}
  |            ^^^^^^
  |
  = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
  = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable

error[E0658]: `const_trait` is a temporary placeholder for marking a trait that is suitable for `const` `impls` and all default bodies as `const`, which may be removed or renamed in the future.
 --> qwer.rs:5:1
  |
5 | #[const_trait]
  | ^^^^^^^^^^^^^^
  |
  = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
  = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `qwer`
 --> qwer.rs:6:25
  |
6 | trait Bar: ~const Foo {}
  |                         ^ consider adding a `main` function to `qwer.rs`

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:     0x7f7224fb1edc - std::backtrace_rs::backtrace::libunwind::trace::hbd96f5b5ca760e25
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f7224fb1edc - std::backtrace_rs::backtrace::trace_unsynchronized::h64131a6af1873394
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7224fb1edc - std::sys_common::backtrace::_print_fmt::h172fc171fb8edd0e
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f7224fb1edc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2fb904bfdf593293
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f7225005040 - core::fmt::rt::Argument::fmt::h04c813bb3f4f9dfb
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/core/src/fmt/rt.rs:142:9
   5:     0x7f7225005040 - core::fmt::write::hf0b14553553e6ae7
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f7224fa5e7f - std::io::Write::write_fmt::h67b55b820fce9842
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/io/mod.rs:1810:15
   7:     0x7f7224fb1cc4 - std::sys_common::backtrace::_print::h0afe0dc870608b31
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f7224fb1cc4 - std::sys_common::backtrace::print::h9c7e632153240ab4
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f7224fb4987 - std::panicking::default_hook::{{closure}}::h03700dce8c7b3295
  10:     0x7f7224fb46ef - std::panicking::default_hook::h7f9a2c2d59169cb4
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:292:9
  11:     0x7f7221d689a0 - std[7ee343ea645c6a12]::panicking::update_hook::<alloc[af19cace5d9bbce9]::boxed::Box<rustc_driver_impl[3492dc2caf138e1f]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f7224fb50a6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h2a91d8c21992f1a0
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/alloc/src/boxed.rs:2029:9
  13:     0x7f7224fb50a6 - std::panicking::rust_panic_with_hook::hda97263b2307fce0
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:783:13
  14:     0x7f7224fb4dfc - std::panicking::begin_panic_handler::{{closure}}::h88a9159ebedbb057
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:657:13
  15:     0x7f7224fb2396 - std::sys_common::backtrace::__rust_end_short_backtrace::h62b003032794192c
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f7224fb4b80 - rust_begin_unwind
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:645:5
  17:     0x7f7225001745 - core::panicking::panic_fmt::h18831ead799d5be5
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/core/src/panicking.rs:72:14
  18:     0x7f7225001cdb - core::panicking::assert_failed_inner::h62fb3536955a459c
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/core/src/panicking.rs:342:17
  19:     0x7f7221e31efb - core[88eeaa8f9cd7aee6]::panicking::assert_failed::<&str, &str>
  20:     0x7f722393871f - <dyn rustc_hir_analysis[93f7da0bb9d56fdd]::astconv::AstConv>::instantiate_poly_trait_ref
  21:     0x7f722386703f - <dyn rustc_hir_analysis[93f7da0bb9d56fdd]::astconv::AstConv>::compute_bounds
  22:     0x7f7223866a88 - rustc_hir_analysis[93f7da0bb9d56fdd]::collect::predicates_of::implied_predicates_with_filter
  23:     0x7f722397299b - rustc_hir_analysis[93f7da0bb9d56fdd]::collect::predicates_of::super_predicates_of
  24:     0x7f72239729fe - rustc_query_impl[cebd3a41b0a13376]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cebd3a41b0a13376]::query_impl::super_predicates_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e69f904d46cbb93a]::query::erase::Erased<[u8; 24usize]>>
  25:     0x7f72239729ad - <rustc_query_impl[cebd3a41b0a13376]::query_impl::super_predicates_of::dynamic_query::{closure#2} as core[88eeaa8f9cd7aee6]::ops::function::FnOnce<(rustc_middle[e69f904d46cbb93a]::ty::context::TyCtxt, rustc_span[50b75e0f982c177c]::def_id::DefId)>>::call_once
  26:     0x7f72231353fb - rustc_query_system[a286237d0122231d]::query::plumbing::try_execute_query::<rustc_query_impl[cebd3a41b0a13376]::DynamicConfig<rustc_query_system[a286237d0122231d]::query::caches::DefaultCache<rustc_span[50b75e0f982c177c]::def_id::DefId, rustc_middle[e69f904d46cbb93a]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[cebd3a41b0a13376]::plumbing::QueryCtxt, false>
  27:     0x7f7223867ba3 - rustc_query_impl[cebd3a41b0a13376]::query_impl::super_predicates_of::get_query_non_incr::__rust_end_short_backtrace
  28:     0x7f72231d6585 - rustc_middle[e69f904d46cbb93a]::query::plumbing::query_get_at::<rustc_query_system[a286237d0122231d]::query::caches::DefaultCache<rustc_span[50b75e0f982c177c]::def_id::DefId, rustc_middle[e69f904d46cbb93a]::query::erase::Erased<[u8; 24usize]>>>
  29:     0x7f722351f592 - <rustc_hir_analysis[93f7da0bb9d56fdd]::collect::CollectItemTypesVisitor as rustc_hir[46e478dc7a893d06]::intravisit::Visitor>::visit_item
  30:     0x7f722351c3a9 - rustc_hir_analysis[93f7da0bb9d56fdd]::collect::collect_mod_item_types
  31:     0x7f722351c337 - rustc_query_impl[cebd3a41b0a13376]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cebd3a41b0a13376]::query_impl::collect_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e69f904d46cbb93a]::query::erase::Erased<[u8; 0usize]>>
  32:     0x7f7223c55e3b - rustc_query_system[a286237d0122231d]::query::plumbing::try_execute_query::<rustc_query_impl[cebd3a41b0a13376]::DynamicConfig<rustc_query_system[a286237d0122231d]::query::caches::DefaultCache<rustc_span[50b75e0f982c177c]::def_id::LocalModDefId, rustc_middle[e69f904d46cbb93a]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[cebd3a41b0a13376]::plumbing::QueryCtxt, false>
  33:     0x7f7223c55957 - rustc_query_impl[cebd3a41b0a13376]::query_impl::collect_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7f7223aada1f - rustc_hir_analysis[93f7da0bb9d56fdd]::check_crate
  35:     0x7f722391b117 - rustc_interface[10542add6e558f68]::passes::analysis
  36:     0x7f722391ad5d - rustc_query_impl[cebd3a41b0a13376]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cebd3a41b0a13376]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e69f904d46cbb93a]::query::erase::Erased<[u8; 1usize]>>
  37:     0x7f7223f9a932 - rustc_query_system[a286237d0122231d]::query::plumbing::try_execute_query::<rustc_query_impl[cebd3a41b0a13376]::DynamicConfig<rustc_query_system[a286237d0122231d]::query::caches::SingleCache<rustc_middle[e69f904d46cbb93a]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[cebd3a41b0a13376]::plumbing::QueryCtxt, false>
  38:     0x7f7223f9a739 - rustc_query_impl[cebd3a41b0a13376]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  39:     0x7f72240544b1 - rustc_interface[10542add6e558f68]::interface::run_compiler::<core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>, rustc_driver_impl[3492dc2caf138e1f]::run_compiler::{closure#0}>::{closure#0}
  40:     0x7f7223fccb46 - std[7ee343ea645c6a12]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[10542add6e558f68]::util::run_in_thread_with_globals<rustc_interface[10542add6e558f68]::util::run_in_thread_pool_with_globals<rustc_interface[10542add6e558f68]::interface::run_compiler<core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>, rustc_driver_impl[3492dc2caf138e1f]::run_compiler::{closure#0}>::{closure#0}, core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>>::{closure#0}, core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>>
  41:     0x7f7223fcc973 - <<std[7ee343ea645c6a12]::thread::Builder>::spawn_unchecked_<rustc_interface[10542add6e558f68]::util::run_in_thread_with_globals<rustc_interface[10542add6e558f68]::util::run_in_thread_pool_with_globals<rustc_interface[10542add6e558f68]::interface::run_compiler<core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>, rustc_driver_impl[3492dc2caf138e1f]::run_compiler::{closure#0}>::{closure#0}, core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>>::{closure#0}, core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[88eeaa8f9cd7aee6]::result::Result<(), rustc_span[50b75e0f982c177c]::ErrorGuaranteed>>::{closure#1} as core[88eeaa8f9cd7aee6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x7f7224fbeef5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc2c3cc39d6b77a09
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/alloc/src/boxed.rs:2015:9
  43:     0x7f7224fbeef5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf074611a704c4f76
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/alloc/src/boxed.rs:2015:9
  44:     0x7f7224fbeef5 - std::sys::unix::thread::Thread::new::thread_start::h1479436da4eb4142
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys/unix/thread.rs:108:17
  45:     0x7f721ee6cac3 - <unknown>
  46:     0x7f721eefe660 - <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 `/rustc-ice-2023-12-18T10_46_22-64015.txt` to your bug report

note: compiler flags: -Z no-codegen

query stack during panic:
#0 [super_predicates_of] computing the super predicates of `Bar`
#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 3 previous errors

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

@cushionbadak cushionbadak 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 Dec 18, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 18, 2023
@cushionbadak
Copy link
Author

I missed -Zcrate-attr="feature(effects)" option, sorry.
And here's the result with feature(effects) option, I guess it's not different from above backtrace:

Command: /root/.cargo/bin/rustc qwer.rs -Zno-codegen -Zcrate-attr="feature(effects)"
Meta:

rustc 1.76.0-nightly (6a6287132 2023-12-17)
binary: rustc
commit-hash: 6a62871320e262661bb1a0ea7f8aec9d3abeddf2
commit-date: 2023-12-17
host: aarch64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.6
Backtrace

error[E0658]: const trait impls are experimental
 --> qwer.rs:6:12
  |
6 | trait Bar: ~const Foo {}
  |            ^^^^^^
  |
  = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
  = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable

error[E0658]: `const_trait` is a temporary placeholder for marking a trait that is suitable for `const` `impls` and all default bodies as `const`, which may be removed or renamed in the future.
 --> qwer.rs:5:1
  |
5 | #[const_trait]
  | ^^^^^^^^^^^^^^
  |
  = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
  = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `qwer`
 --> qwer.rs:6:25
  |
6 | trait Bar: ~const Foo {}
  |                         ^ consider adding a `main` function to `qwer.rs`

error[E0636]: the feature `effects` has already been declared
 --> <crate attribute>:1:9
  |
1 | feature(effects)
  |         ^^^^^^^

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:     0xffff8d3e1e78 - std::backtrace_rs::backtrace::libunwind::trace::hdb3ab083f225f15f
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0xffff8d3e1e78 - std::backtrace_rs::backtrace::trace_unsynchronized::h9c6bc58e3da50330
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0xffff8d3e1e78 - std::sys_common::backtrace::_print_fmt::h6c8b18a814ce0a45
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:68:5
   3:     0xffff8d3e1e78 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9e6c406380cff063
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:44:22
   4:     0xffff8d42cfc8 - core::fmt::rt::Argument::fmt::hfc7c2d10659245cb
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/core/src/fmt/rt.rs:142:9
   5:     0xffff8d42cfc8 - core::fmt::write::h4274bac8336faf20
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/core/src/fmt/mod.rs:1120:17
   6:     0xffff8d3d7dd4 - std::io::Write::write_fmt::h3e8f0770863ab2c4
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/io/mod.rs:1810:15
   7:     0xffff8d3e1cac - std::sys_common::backtrace::_print::h63204d48c6bc8cb0
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:47:5
   8:     0xffff8d3e1cac - std::sys_common::backtrace::print::hd54f4b34c795ac2a
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:34:9
   9:     0xffff8d3e46a4 - std::panicking::default_hook::{{closure}}::h86b397ea974ff6a2
  10:     0xffff8d3e43d8 - std::panicking::default_hook::hc9f3c16000e8858d
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:292:9
  11:     0xffff8df76060 - <alloc[a867994c613ae218]::boxed::Box<rustc_driver_impl[fcd8955f634a9c13]::install_ice_hook::{closure#0}> as core[26a2d9486da2af9b]::ops::function::Fn<(&dyn for<'a, 'b> core[26a2d9486da2af9b]::ops::function::Fn<(&'a core[26a2d9486da2af9b]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[26a2d9486da2af9b]::marker::Sync + core[26a2d9486da2af9b]::marker::Send, &core[26a2d9486da2af9b]::panic::panic_info::PanicInfo)>>::call
  12:     0xffff8d3e4d8c - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hab87e45f67c2fa15
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/alloc/src/boxed.rs:2029:9
  13:     0xffff8d3e4d8c - std::panicking::rust_panic_with_hook::ha3fd3084d6e396b6
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:783:13
  14:     0xffff8d3e4b14 - std::panicking::begin_panic_handler::{{closure}}::hc3fb351ea287b658
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:657:13
  15:     0xffff8d3e2330 - std::sys_common::backtrace::__rust_end_short_backtrace::h241fa1a779de9eba
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys_common/backtrace.rs:171:18
  16:     0xffff8d3e48b4 - rust_begin_unwind
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/panicking.rs:645:5
  17:     0xffff8d3b036c - core::panicking::panic_fmt::h2d26b1545d84ba8c
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/core/src/panicking.rs:72:14
  18:     0xffff8d3b0724 - core::panicking::assert_failed_inner::h83156771a9c8ece1
  19:     0xffff8dd00c04 - core[26a2d9486da2af9b]::panicking::assert_failed::<&str, &str>
  20:     0xffff912958ac - rustc_hir_analysis[db8a71beefddd1f3]::astconv::generics::create_args_for_parent_generic_args::<<dyn rustc_hir_analysis[db8a71beefddd1f3]::astconv::AstConv>::create_args_for_ast_path::{closure#0}::SubstsForAstPathCtxt>
  21:     0xffff911cf218 - <dyn rustc_hir_analysis[db8a71beefddd1f3]::astconv::AstConv>::create_args_for_ast_path
  22:     0xffff911d0568 - <dyn rustc_hir_analysis[db8a71beefddd1f3]::astconv::AstConv>::instantiate_poly_trait_ref
  23:     0xffff911bef80 - <dyn rustc_hir_analysis[db8a71beefddd1f3]::astconv::AstConv>::compute_bounds
  24:     0xffff91296a10 - rustc_hir_analysis[db8a71beefddd1f3]::collect::predicates_of::implied_predicates_with_filter
  25:     0xffff912968dc - rustc_hir_analysis[db8a71beefddd1f3]::collect::predicates_of::super_predicates_of
  26:     0xffff91e92ccc - rustc_query_impl[a23a91344546cc95]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a23a91344546cc95]::query_impl::super_predicates_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[38203b4468ea0a09]::query::erase::Erased<[u8; 24usize]>>
  27:     0xffff91fd2e78 - <rustc_query_impl[a23a91344546cc95]::query_impl::super_predicates_of::dynamic_query::{closure#2} as core[26a2d9486da2af9b]::ops::function::FnOnce<(rustc_middle[38203b4468ea0a09]::ty::context::TyCtxt, rustc_span[da37578e392a2900]::def_id::DefId)>>::call_once
  28:     0xffff9210f968 - rustc_query_system[4d7c635518f724d4]::query::plumbing::try_execute_query::<rustc_query_impl[a23a91344546cc95]::DynamicConfig<rustc_query_system[4d7c635518f724d4]::query::caches::DefaultCache<rustc_span[da37578e392a2900]::def_id::DefId, rustc_middle[38203b4468ea0a09]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[a23a91344546cc95]::plumbing::QueryCtxt, false>
  29:     0xffff91fec0c8 - rustc_query_impl[a23a91344546cc95]::query_impl::super_predicates_of::get_query_non_incr::__rust_end_short_backtrace
  30:     0xffff912845d8 - rustc_middle[38203b4468ea0a09]::query::plumbing::query_get_at::<rustc_query_system[4d7c635518f724d4]::query::caches::DefaultCache<rustc_span[da37578e392a2900]::def_id::DefId, rustc_middle[38203b4468ea0a09]::query::erase::Erased<[u8; 24usize]>>>
  31:     0xffff9129e364 - rustc_hir_analysis[db8a71beefddd1f3]::collect::convert_item
  32:     0xffff91297564 - <rustc_hir_analysis[db8a71beefddd1f3]::collect::CollectItemTypesVisitor as rustc_hir[57cc12b94e4088d7]::intravisit::Visitor>::visit_item
  33:     0xffff911deaa0 - <rustc_middle[38203b4468ea0a09]::hir::map::Map>::visit_item_likes_in_module::<rustc_hir_analysis[db8a71beefddd1f3]::collect::CollectItemTypesVisitor>
  34:     0xffff91296dc4 - rustc_hir_analysis[db8a71beefddd1f3]::collect::collect_mod_item_types
  35:     0xffff91e9364c - rustc_query_impl[a23a91344546cc95]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a23a91344546cc95]::query_impl::collect_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[38203b4468ea0a09]::query::erase::Erased<[u8; 0usize]>>
  36:     0xffff91f1a0c8 - <rustc_query_impl[a23a91344546cc95]::query_impl::collect_mod_item_types::dynamic_query::{closure#2} as core[26a2d9486da2af9b]::ops::function::FnOnce<(rustc_middle[38203b4468ea0a09]::ty::context::TyCtxt, rustc_span[da37578e392a2900]::def_id::LocalModDefId)>>::call_once
  37:     0xffff921033ec - rustc_query_system[4d7c635518f724d4]::query::plumbing::try_execute_query::<rustc_query_impl[a23a91344546cc95]::DynamicConfig<rustc_query_system[4d7c635518f724d4]::query::caches::DefaultCache<rustc_span[da37578e392a2900]::def_id::LocalModDefId, rustc_middle[38203b4468ea0a09]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[a23a91344546cc95]::plumbing::QueryCtxt, false>
  38:     0xffff92007848 - rustc_query_impl[a23a91344546cc95]::query_impl::collect_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  39:     0xffff911defb8 - <rustc_session[f7aa31cfcbba9531]::session::Session>::track_errors::<rustc_hir_analysis[db8a71beefddd1f3]::check_crate::{closure#0}, ()>
  40:     0xffff91321498 - rustc_hir_analysis[db8a71beefddd1f3]::check_crate
  41:     0xffff8e105d40 - rustc_interface[b5c8d284a7cb21a0]::passes::analysis
  42:     0xffff91e95608 - rustc_query_impl[a23a91344546cc95]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a23a91344546cc95]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[38203b4468ea0a09]::query::erase::Erased<[u8; 1usize]>>
  43:     0xffff91f962ec - <rustc_query_impl[a23a91344546cc95]::query_impl::analysis::dynamic_query::{closure#2} as core[26a2d9486da2af9b]::ops::function::FnOnce<(rustc_middle[38203b4468ea0a09]::ty::context::TyCtxt, ())>>::call_once
  44:     0xffff920c5674 - rustc_query_system[4d7c635518f724d4]::query::plumbing::try_execute_query::<rustc_query_impl[a23a91344546cc95]::DynamicConfig<rustc_query_system[4d7c635518f724d4]::query::caches::SingleCache<rustc_middle[38203b4468ea0a09]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a23a91344546cc95]::plumbing::QueryCtxt, false>
  45:     0xffff91f39e7c - rustc_query_impl[a23a91344546cc95]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  46:     0xffff8df62b10 - <rustc_middle[38203b4468ea0a09]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[fcd8955f634a9c13]::run_compiler::{closure#0}::{closure#0}::{closure#3}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>
  47:     0xffff8dfc90d8 - <rustc_interface[b5c8d284a7cb21a0]::interface::Compiler>::enter::<rustc_driver_impl[fcd8955f634a9c13]::run_compiler::{closure#0}::{closure#0}, core[26a2d9486da2af9b]::result::Result<core[26a2d9486da2af9b]::option::Option<rustc_interface[b5c8d284a7cb21a0]::queries::Linker>, rustc_span[da37578e392a2900]::ErrorGuaranteed>>
  48:     0xffff8df69ca0 - rustc_span[da37578e392a2900]::set_source_map::<core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>, rustc_interface[b5c8d284a7cb21a0]::interface::run_compiler<core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>, rustc_driver_impl[fcd8955f634a9c13]::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
  49:     0xffff8df7ae70 - <scoped_tls[468cdda3715893e4]::ScopedKey<rustc_span[da37578e392a2900]::SessionGlobals>>::set::<rustc_interface[b5c8d284a7cb21a0]::util::run_in_thread_pool_with_globals<rustc_interface[b5c8d284a7cb21a0]::interface::run_compiler<core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>, rustc_driver_impl[fcd8955f634a9c13]::run_compiler::{closure#0}>::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>
  50:     0xffff8df6a10c - rustc_span[da37578e392a2900]::create_session_globals_then::<core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>, rustc_interface[b5c8d284a7cb21a0]::util::run_in_thread_pool_with_globals<rustc_interface[b5c8d284a7cb21a0]::interface::run_compiler<core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>, rustc_driver_impl[fcd8955f634a9c13]::run_compiler::{closure#0}>::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>::{closure#0}>
  51:     0xffff8df9774c - std[3bb575e3090e5950]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b5c8d284a7cb21a0]::util::run_in_thread_with_globals<rustc_interface[b5c8d284a7cb21a0]::util::run_in_thread_pool_with_globals<rustc_interface[b5c8d284a7cb21a0]::interface::run_compiler<core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>, rustc_driver_impl[fcd8955f634a9c13]::run_compiler::{closure#0}>::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>
  52:     0xffff8df82084 - <<std[3bb575e3090e5950]::thread::Builder>::spawn_unchecked_<rustc_interface[b5c8d284a7cb21a0]::util::run_in_thread_with_globals<rustc_interface[b5c8d284a7cb21a0]::util::run_in_thread_pool_with_globals<rustc_interface[b5c8d284a7cb21a0]::interface::run_compiler<core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>, rustc_driver_impl[fcd8955f634a9c13]::run_compiler::{closure#0}>::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[26a2d9486da2af9b]::result::Result<(), rustc_span[da37578e392a2900]::ErrorGuaranteed>>::{closure#1} as core[26a2d9486da2af9b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  53:     0xffff8d3ede90 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4efa9582cf0a9c08
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/alloc/src/boxed.rs:2015:9
  54:     0xffff8d3ede90 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb73cc4a0047386e7
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/alloc/src/boxed.rs:2015:9
  55:     0xffff8d3ede90 - std::sys::unix::thread::Thread::new::thread_start::hb5977602fcf24b48
                               at /rustc/6a62871320e262661bb1a0ea7f8aec9d3abeddf2/library/std/src/sys/unix/thread.rs:108:17
  56:     0xffff8d23d5c8 - <unknown>
  57:     0xffff8d2a5d5c - <unknown>
  58:                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 `/rustc-ice-2023-12-18T13_06_00-21702.txt` to your bug report

note: compiler flags: -Z no-codegen -Z crate-attr=feature(effects)

query stack during panic:
#0 [super_predicates_of] computing the super predicates of `Bar`
#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 4 previous errors

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

@fmease
Copy link
Member

fmease commented Dec 18, 2023

Thanks for your report! However, I'm gonna close it in favor of #117244 since I know that the root cause is identical despite the query stack differing. Note that I will open a fix for #117244 / your issue in a moment, together with some other changes.

@fmease fmease closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
@fmease fmease added F-effects `#![feature(effects)]` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 18, 2023
@fmease
Copy link
Member

fmease commented Dec 18, 2023

cc #119089

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-effects `#![feature(effects)]` 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

No branches or pull requests

3 participants