Comments (5)
searched nightlies: from nightly-2022-02-19 to nightly-2024-06-25
regressed nightly: nightly-2024-03-08
searched commit range: 7d3702e...9c3ad80
regressed commit: 8c9a75b (#121154)
from rust.
Minimized:
struct Thing;
pub trait Every {
type Assoc;
}
impl<T: ?Sized> Every for Thing {
type Assoc = T;
}
static I: <Thing as Every>::Assoc = 3;
Error output
Compiling playground v0.0.1 (/playground)
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> src/lib.rs:6:6
|
6 | impl<T: ?Sized> Every for Thing {
| ^ unconstrained type parameter
error[E0283]: type annotations needed
--> src/lib.rs:10:11
|
10 | static I: <Thing as Every>::Assoc = 3;
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
|
= note: cannot satisfy `_: Sync`
= note: shared static variables must have a type that implements `Sync`
error: internal compiler error: compiler/rustc_ty_utils/src/layout.rs:676:13: Layout::compute: unexpected type `_`
thread 'rustc' panicked at compiler/rustc_ty_utils/src/layout.rs:676:13:
Box<dyn Any>
stack backtrace:
0: 0x7f5be3c9b035 - std::backtrace_rs::backtrace::libunwind::trace::h1a07e5dba0da0cd2
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
1: 0x7f5be3c9b035 - std::backtrace_rs::backtrace::trace_unsynchronized::h61b9b8394328c0bc
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f5be3c9b035 - std::sys_common::backtrace::_print_fmt::h1c5e18b460934cff
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:68:5
3: 0x7f5be3c9b035 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1e1a1972118942ad
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7f5be3cea29b - core::fmt::rt::Argument::fmt::h07af2b4071d536cd
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/rt.rs:165:63
5: 0x7f5be3cea29b - core::fmt::write::hc090a2ffd6b28c4a
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/mod.rs:1157:21
6: 0x7f5be3c8fbdf - std::io::Write::write_fmt::h8898bac6ff039a23
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/io/mod.rs:1832:15
7: 0x7f5be3c9ae0e - std::sys_common::backtrace::_print::h4e80c5803d4ee35b
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7f5be3c9ae0e - std::sys_common::backtrace::print::ha96650907276675e
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7f5be3c9d779 - std::panicking::default_hook::{{closure}}::h215c2a0a8346e0e0
10: 0x7f5be3c9d4bd - std::panicking::default_hook::h207342be97478370
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:298:9
11: 0x7f5be6b981b7 - std[3c8ba8ebcf555201]::panicking::update_hook::<alloc[bfbae7e348dce413]::boxed::Box<rustc_driver_impl[c88438ade88661f4]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7f5be3c9de76 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha9c3bc81d312fd83
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2036:9
13: 0x7f5be3c9de76 - std::panicking::rust_panic_with_hook::hac8bdceee1e4fe2c
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:799:13
14: 0x7f5be6bc5b44 - std[3c8ba8ebcf555201]::panicking::begin_panic::<rustc_errors[80cf825e20fac581]::ExplicitBug>::{closure#0}
15: 0x7f5be6bc24f6 - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_end_short_backtrace::<std[3c8ba8ebcf555201]::panicking::begin_panic<rustc_errors[80cf825e20fac581]::ExplicitBug>::{closure#0}, !>
16: 0x7f5be6bbdb66 - std[3c8ba8ebcf555201]::panicking::begin_panic::<rustc_errors[80cf825e20fac581]::ExplicitBug>
17: 0x7f5be6bcef01 - <rustc_errors[80cf825e20fac581]::diagnostic::BugAbort as rustc_errors[80cf825e20fac581]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
18: 0x7f5be7048b1c - rustc_middle[3ff731b746e7b038]::util::bug::opt_span_bug_fmt::<rustc_span[8c7415e9d33ddd75]::span_encoding::Span>::{closure#0}
19: 0x7f5be702fc2a - rustc_middle[3ff731b746e7b038]::ty::context::tls::with_opt::<rustc_middle[3ff731b746e7b038]::util::bug::opt_span_bug_fmt<rustc_span[8c7415e9d33ddd75]::span_encoding::Span>::{closure#0}, !>::{closure#0}
20: 0x7f5be702facb - rustc_middle[3ff731b746e7b038]::ty::context::tls::with_context_opt::<rustc_middle[3ff731b746e7b038]::ty::context::tls::with_opt<rustc_middle[3ff731b746e7b038]::util::bug::opt_span_bug_fmt<rustc_span[8c7415e9d33ddd75]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
21: 0x7f5be4da0740 - rustc_middle[3ff731b746e7b038]::util::bug::bug_fmt
22: 0x7f5be855b842 - rustc_ty_utils[b79b74a9f824867d]::layout::layout_of_uncached
23: 0x7f5be854d990 - rustc_ty_utils[b79b74a9f824867d]::layout::layout_of
24: 0x7f5be854d911 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 16usize]>>
25: 0x7f5be854d0bd - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
26: 0x7f5be854cdb2 - rustc_query_impl[a12402620de91e8]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
27: 0x7f5be855fc0a - rustc_middle[3ff731b746e7b038]::query::plumbing::query_get_at::<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 16usize]>>>
28: 0x7f5be854db59 - rustc_ty_utils[b79b74a9f824867d]::layout::layout_of
29: 0x7f5be854d911 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 16usize]>>
30: 0x7f5be854d0bd - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
31: 0x7f5be854cdb2 - rustc_query_impl[a12402620de91e8]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
32: 0x7f5be8dafaec - rustc_middle[3ff731b746e7b038]::query::plumbing::query_get_at::<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 16usize]>>>
33: 0x7f5be8daf63b - rustc_hir_analysis[46a17d8846b4335f]::check::check::check_static_inhabited
34: 0x7f5be8db4fa0 - rustc_hir_analysis[46a17d8846b4335f]::check::check::check_item_type
35: 0x7f5be84da627 - rustc_hir_analysis[46a17d8846b4335f]::check::wfcheck::check_well_formed
36: 0x7f5be84d923d - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>
37: 0x7f5be84d8de3 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::VecCache<rustc_hir[809d8cc19d3b2ead]::hir_id::OwnerId, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
38: 0x7f5be84d8b99 - rustc_query_impl[a12402620de91e8]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
39: 0x7f5be84d6e95 - rustc_hir_analysis[46a17d8846b4335f]::check::wfcheck::check_mod_type_wf
40: 0x7f5be84d6d49 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>
41: 0x7f5be8b12210 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_span[8c7415e9d33ddd75]::def_id::LocalModDefId, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
42: 0x7f5be8b11fff - rustc_query_impl[a12402620de91e8]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
43: 0x7f5be86d91d0 - rustc_hir_analysis[46a17d8846b4335f]::check_crate
44: 0x7f5be88980e0 - rustc_interface[640972162e3c086f]::passes::analysis
45: 0x7f5be8897aef - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>
46: 0x7f5be8bf1022 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::SingleCache<rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
47: 0x7f5be8bf0dc9 - rustc_query_impl[a12402620de91e8]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
48: 0x7f5be8a92149 - rustc_interface[640972162e3c086f]::interface::run_compiler::<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}
49: 0x7f5be8a4ff8b - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>
50: 0x7f5be8a4fd80 - <<std[3c8ba8ebcf555201]::thread::Builder>::spawn_unchecked_<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#2} as core[868bc93c3f2beb33]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
51: 0x7f5be3ca7cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h09e5a4c541afa800
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
52: 0x7f5be3ca7cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9c8b03c22f4e7026
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
53: 0x7f5be3ca7cab - std::sys::pal::unix::thread::Thread::new::thread_start::h522bc89a54da820a
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys/pal/unix/thread.rs:108:17
54: 0x7f5be3bb5609 - start_thread
55: 0x7f5be3ad8353 - clone
56: 0x0 - <unknown>
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.79.0 (129f3b996 2024-06-10) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [layout_of] computing layout of `_`
#1 [layout_of] computing layout of `<Thing as Every>::Assoc`
#2 [check_well_formed] checking that `I` is well-formed
#3 [check_mod_type_wf] checking that types are well-formed in top-level module
#4 [analysis] running analysis passes on this crate
end of query stack
Some errors have detailed explanations: E0207, E0283.
For more information about an error, try `rustc --explain E0207`.
error: could not compile `playground` (lib) due to 2 previous errors
from rust.
Variant with a different ICE (index out of bounds: the len is 0 but the index is 0
)
struct Thing;
pub trait Every {
type Assoc;
}
impl<T: ?Sized> Every for Thing {
type Assoc = T;
}
fn foo(_: <Thing as Every>::Assoc) {}
Error output
Compiling playground v0.0.1 (/playground)
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> src/lib.rs:6:6
|
6 | impl<T: ?Sized> Every for Thing {
| ^ unconstrained type parameter
error[E0282]: type annotations needed
--> src/lib.rs:10:11
|
10 | fn foo(_: <Thing as Every>::Assoc) {}
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
error[E0282]: type annotations needed
--> src/lib.rs:10:8
|
10 | fn foo(_: <Thing as Every>::Assoc) {}
| ^ cannot infer type for type parameter `T`
thread 'rustc' panicked at /rust/deps/ena-0.14.2/src/snapshot_vec.rs:199:10:
index out of bounds: the len is 0 but the index is 0
stack backtrace:
0: 0x7f0d4f6d5035 - std::backtrace_rs::backtrace::libunwind::trace::h1a07e5dba0da0cd2
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
1: 0x7f0d4f6d5035 - std::backtrace_rs::backtrace::trace_unsynchronized::h61b9b8394328c0bc
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f0d4f6d5035 - std::sys_common::backtrace::_print_fmt::h1c5e18b460934cff
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:68:5
3: 0x7f0d4f6d5035 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1e1a1972118942ad
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7f0d4f72429b - core::fmt::rt::Argument::fmt::h07af2b4071d536cd
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/rt.rs:165:63
5: 0x7f0d4f72429b - core::fmt::write::hc090a2ffd6b28c4a
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/mod.rs:1157:21
6: 0x7f0d4f6c9bdf - std::io::Write::write_fmt::h8898bac6ff039a23
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/io/mod.rs:1832:15
7: 0x7f0d4f6d4e0e - std::sys_common::backtrace::_print::h4e80c5803d4ee35b
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7f0d4f6d4e0e - std::sys_common::backtrace::print::ha96650907276675e
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7f0d4f6d7779 - std::panicking::default_hook::{{closure}}::h215c2a0a8346e0e0
10: 0x7f0d4f6d74bd - std::panicking::default_hook::h207342be97478370
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:298:9
11: 0x7f0d525d21b7 - std[3c8ba8ebcf555201]::panicking::update_hook::<alloc[bfbae7e348dce413]::boxed::Box<rustc_driver_impl[c88438ade88661f4]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7f0d4f6d7e76 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha9c3bc81d312fd83
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2036:9
13: 0x7f0d4f6d7e76 - std::panicking::rust_panic_with_hook::hac8bdceee1e4fe2c
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:799:13
14: 0x7f0d4f6d7c24 - std::panicking::begin_panic_handler::{{closure}}::h00d785e82757ce3c
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:664:13
15: 0x7f0d4f6d54f9 - std::sys_common::backtrace::__rust_end_short_backtrace::h1628d957bcd06996
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:171:18
16: 0x7f0d4f6d7957 - rust_begin_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
17: 0x7f0d4f720763 - core::panicking::panic_fmt::hdc63834ffaaefae5
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14
18: 0x7f0d4f720987 - core::panicking::panic_bounds_check::hd7e618b1b39cc1c3
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:275:5
19: 0x7f0d54a5f768 - <ena[7ba0c23a1613b29]::unify::UnificationTable<ena[7ba0c23a1613b29]::unify::backing_vec::InPlace<rustc_infer[abd41066181445be]::infer::type_variable::TyVidEqKey, &mut alloc[bfbae7e348dce413]::vec::Vec<ena[7ba0c23a1613b29]::unify::VarValue<rustc_infer[abd41066181445be]::infer::type_variable::TyVidEqKey>>, &mut rustc_infer[abd41066181445be]::infer::snapshot::undo_log::InferCtxtUndoLogs>>>::uninlined_get_root_key.llvm.6537034541696690420.cold
20: 0x7f0d507a0045 - <rustc_infer[abd41066181445be]::infer::canonical::canonicalizer::Canonicalizer as rustc_type_ir[a145be3c51398263]::fold::TypeFolder<rustc_middle[3ff731b746e7b038]::ty::context::TyCtxt>>::fold_ty
21: 0x7f0d53dd6b38 - <rustc_infer[abd41066181445be]::infer::canonical::canonicalizer::Canonicalizer as rustc_type_ir[a145be3c51398263]::fold::FallibleTypeFolder<rustc_middle[3ff731b746e7b038]::ty::context::TyCtxt>>::try_fold_predicate
22: 0x7f0d5115701f - rustc_trait_selection[173dcaf5d960508e]::traits::type_known_to_meet_bound_modulo_regions
23: 0x7f0d53ba840b - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::is_copy_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>
24: 0x7f0d53ba93c6 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
25: 0x7f0d53ba90ce - rustc_query_impl[a12402620de91e8]::query_impl::is_copy_raw::get_query_non_incr::__rust_end_short_backtrace
26: 0x7f0d53baa0eb - rustc_ty_utils[b79b74a9f824867d]::needs_drop::needs_drop_raw
27: 0x7f0d53ba9b59 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::needs_drop_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>
28: 0x7f0d53ba936a - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
29: 0x7f0d53ba900e - rustc_query_impl[a12402620de91e8]::query_impl::needs_drop_raw::get_query_non_incr::__rust_end_short_backtrace
30: 0x7f0d50b12f93 - <rustc_mir_transform[2984d3182075647]::elaborate_drops::ElaborateDrops as rustc_middle[3ff731b746e7b038]::mir::MirPass>::run_pass
31: 0x7f0d5394a4cd - rustc_mir_transform[2984d3182075647]::pass_manager::run_passes_inner
32: 0x7f0d5141bff7 - rustc_mir_transform[2984d3182075647]::mir_drops_elaborated_and_const_checked
33: 0x7f0d53a5ec31 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 8usize]>>
34: 0x7f0d53a5ef2d - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::VecCache<rustc_span[8c7415e9d33ddd75]::def_id::LocalDefId, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
35: 0x7f0d53a5e78c - rustc_query_impl[a12402620de91e8]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
36: 0x7f0d542d2432 - rustc_interface[640972162e3c086f]::passes::analysis
37: 0x7f0d542d1aef - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>
38: 0x7f0d5462b022 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::SingleCache<rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false>
39: 0x7f0d5462adc9 - rustc_query_impl[a12402620de91e8]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
40: 0x7f0d544cc149 - rustc_interface[640972162e3c086f]::interface::run_compiler::<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}
41: 0x7f0d54489f8b - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>
42: 0x7f0d54489d80 - <<std[3c8ba8ebcf555201]::thread::Builder>::spawn_unchecked_<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#2} as core[868bc93c3f2beb33]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
43: 0x7f0d4f6e1cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h09e5a4c541afa800
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
44: 0x7f0d4f6e1cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9c8b03c22f4e7026
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
45: 0x7f0d4f6e1cab - std::sys::pal::unix::thread::Thread::new::thread_start::h522bc89a54da820a
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys/pal/unix/thread.rs:108:17
46: 0x7f0d4f5ef609 - start_thread
47: 0x7f0d4f512353 - clone
48: 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.79.0 (129f3b996 2024-06-10) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [is_copy_raw] computing whether `_` is `Copy`
#1 [needs_drop_raw] computing whether `_` needs drop
#2 [mir_drops_elaborated_and_const_checked] elaborating drops for `foo`
#3 [analysis] running analysis passes on this crate
end of query stack
Some errors have detailed explanations: E0207, E0282.
For more information about an error, try `rustc --explain E0207`.
error: could not compile `playground` (lib) due to 3 previous errors
Removing the ?Sized
makes the ICE go away for some reason.
from rust.
Minimized:
struct Thing; pub trait Every { type Assoc; } impl<T: ?Sized> Every for Thing { type Assoc = T; } static I: <Thing as Every>::Assoc = 3;
I investigated using the above code. The ICE occurs when we call the layout
query during the inhabitedness check for the static I
. Given the assignment to 3
in the declaration static I: <Thing as Every>::Assoc = 3
its type should normalize and resolve to i32
or something, but because we have a T: ?Size
constraint in the impl that is not possible. So we get back a tykind Infer
instead. When that Infer
type is passed to layout_of_uncached
it ICEs.
That explains why removing the ?Sized
constraint makes the issue go away.
@rustbot claim
from rust.
Variant with a different ICE (
index out of bounds: the len is 0 but the index is 0
)struct Thing; pub trait Every { type Assoc; } impl<T: ?Sized> Every for Thing { type Assoc = T; } fn foo(_: <Thing as Every>::Assoc) {}Error output
Compiling playground v0.0.1 (/playground) error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates --> src/lib.rs:6:6 | 6 | impl<T: ?Sized> Every for Thing { | ^ unconstrained type parameter error[E0282]: type annotations needed --> src/lib.rs:10:11 | 10 | fn foo(_: <Thing as Every>::Assoc) {} | ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` error[E0282]: type annotations needed --> src/lib.rs:10:8 | 10 | fn foo(_: <Thing as Every>::Assoc) {} | ^ cannot infer type for type parameter `T` thread 'rustc' panicked at /rust/deps/ena-0.14.2/src/snapshot_vec.rs:199:10: index out of bounds: the len is 0 but the index is 0 stack backtrace: 0: 0x7f0d4f6d5035 - std::backtrace_rs::backtrace::libunwind::trace::h1a07e5dba0da0cd2 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5 1: 0x7f0d4f6d5035 - std::backtrace_rs::backtrace::trace_unsynchronized::h61b9b8394328c0bc at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f0d4f6d5035 - std::sys_common::backtrace::_print_fmt::h1c5e18b460934cff at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:68:5 3: 0x7f0d4f6d5035 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1e1a1972118942ad at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f0d4f72429b - core::fmt::rt::Argument::fmt::h07af2b4071d536cd at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/rt.rs:165:63 5: 0x7f0d4f72429b - core::fmt::write::hc090a2ffd6b28c4a at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/mod.rs:1157:21 6: 0x7f0d4f6c9bdf - std::io::Write::write_fmt::h8898bac6ff039a23 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/io/mod.rs:1832:15 7: 0x7f0d4f6d4e0e - std::sys_common::backtrace::_print::h4e80c5803d4ee35b at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:47:5 8: 0x7f0d4f6d4e0e - std::sys_common::backtrace::print::ha96650907276675e at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:34:9 9: 0x7f0d4f6d7779 - std::panicking::default_hook::{{closure}}::h215c2a0a8346e0e0 10: 0x7f0d4f6d74bd - std::panicking::default_hook::h207342be97478370 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:298:9 11: 0x7f0d525d21b7 - std[3c8ba8ebcf555201]::panicking::update_hook::<alloc[bfbae7e348dce413]::boxed::Box<rustc_driver_impl[c88438ade88661f4]::install_ice_hook::{closure#0}>>::{closure#0} 12: 0x7f0d4f6d7e76 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha9c3bc81d312fd83 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2036:9 13: 0x7f0d4f6d7e76 - std::panicking::rust_panic_with_hook::hac8bdceee1e4fe2c at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:799:13 14: 0x7f0d4f6d7c24 - std::panicking::begin_panic_handler::{{closure}}::h00d785e82757ce3c at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:664:13 15: 0x7f0d4f6d54f9 - std::sys_common::backtrace::__rust_end_short_backtrace::h1628d957bcd06996 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:171:18 16: 0x7f0d4f6d7957 - rust_begin_unwind at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5 17: 0x7f0d4f720763 - core::panicking::panic_fmt::hdc63834ffaaefae5 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14 18: 0x7f0d4f720987 - core::panicking::panic_bounds_check::hd7e618b1b39cc1c3 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:275:5 19: 0x7f0d54a5f768 - <ena[7ba0c23a1613b29]::unify::UnificationTable<ena[7ba0c23a1613b29]::unify::backing_vec::InPlace<rustc_infer[abd41066181445be]::infer::type_variable::TyVidEqKey, &mut alloc[bfbae7e348dce413]::vec::Vec<ena[7ba0c23a1613b29]::unify::VarValue<rustc_infer[abd41066181445be]::infer::type_variable::TyVidEqKey>>, &mut rustc_infer[abd41066181445be]::infer::snapshot::undo_log::InferCtxtUndoLogs>>>::uninlined_get_root_key.llvm.6537034541696690420.cold 20: 0x7f0d507a0045 - <rustc_infer[abd41066181445be]::infer::canonical::canonicalizer::Canonicalizer as rustc_type_ir[a145be3c51398263]::fold::TypeFolder<rustc_middle[3ff731b746e7b038]::ty::context::TyCtxt>>::fold_ty 21: 0x7f0d53dd6b38 - <rustc_infer[abd41066181445be]::infer::canonical::canonicalizer::Canonicalizer as rustc_type_ir[a145be3c51398263]::fold::FallibleTypeFolder<rustc_middle[3ff731b746e7b038]::ty::context::TyCtxt>>::try_fold_predicate 22: 0x7f0d5115701f - rustc_trait_selection[173dcaf5d960508e]::traits::type_known_to_meet_bound_modulo_regions 23: 0x7f0d53ba840b - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::is_copy_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>> 24: 0x7f0d53ba93c6 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 25: 0x7f0d53ba90ce - rustc_query_impl[a12402620de91e8]::query_impl::is_copy_raw::get_query_non_incr::__rust_end_short_backtrace 26: 0x7f0d53baa0eb - rustc_ty_utils[b79b74a9f824867d]::needs_drop::needs_drop_raw 27: 0x7f0d53ba9b59 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::needs_drop_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>> 28: 0x7f0d53ba936a - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::Ty>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 29: 0x7f0d53ba900e - rustc_query_impl[a12402620de91e8]::query_impl::needs_drop_raw::get_query_non_incr::__rust_end_short_backtrace 30: 0x7f0d50b12f93 - <rustc_mir_transform[2984d3182075647]::elaborate_drops::ElaborateDrops as rustc_middle[3ff731b746e7b038]::mir::MirPass>::run_pass 31: 0x7f0d5394a4cd - rustc_mir_transform[2984d3182075647]::pass_manager::run_passes_inner 32: 0x7f0d5141bff7 - rustc_mir_transform[2984d3182075647]::mir_drops_elaborated_and_const_checked 33: 0x7f0d53a5ec31 - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 8usize]>> 34: 0x7f0d53a5ef2d - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::VecCache<rustc_span[8c7415e9d33ddd75]::def_id::LocalDefId, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 35: 0x7f0d53a5e78c - rustc_query_impl[a12402620de91e8]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace 36: 0x7f0d542d2432 - rustc_interface[640972162e3c086f]::passes::analysis 37: 0x7f0d542d1aef - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>> 38: 0x7f0d5462b022 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::SingleCache<rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, false> 39: 0x7f0d5462adc9 - rustc_query_impl[a12402620de91e8]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace 40: 0x7f0d544cc149 - rustc_interface[640972162e3c086f]::interface::run_compiler::<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1} 41: 0x7f0d54489f8b - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>> 42: 0x7f0d54489d80 - <<std[3c8ba8ebcf555201]::thread::Builder>::spawn_unchecked_<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#2} as core[868bc93c3f2beb33]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 43: 0x7f0d4f6e1cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h09e5a4c541afa800 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9 44: 0x7f0d4f6e1cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9c8b03c22f4e7026 at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9 45: 0x7f0d4f6e1cab - std::sys::pal::unix::thread::Thread::new::thread_start::h522bc89a54da820a at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys/pal/unix/thread.rs:108:17 46: 0x7f0d4f5ef609 - start_thread 47: 0x7f0d4f512353 - clone 48: 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.79.0 (129f3b996 2024-06-10) running on x86_64-unknown-linux-gnu note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [is_copy_raw] computing whether `_` is `Copy` #1 [needs_drop_raw] computing whether `_` needs drop #2 [mir_drops_elaborated_and_const_checked] elaborating drops for `foo` #3 [analysis] running analysis passes on this crate end of query stack Some errors have detailed explanations: E0207, E0282. For more information about an error, try `rustc --explain E0207`. error: could not compile `playground` (lib) due to 3 previous errors
Removing the
?Sized
makes the ICE go away for some reason.
This is a completely different ICE. I have opened a separate issue for it: #127804
from rust.
Related Issues (20)
- ICE: `adding a def'n for node-id NodeId(18) and def kind AnonConst but a previous def'n exists` HOT 9
- Doctests cannot recognize paths that lead to a type in the crate root HOT 3
- `./x check std` should not try to check `no_std` targets HOT 2
- Tracking Issue for unsized const parameter types: `feature(unsized_const_params)`
- Some invalid cargo cache data leads to ICE
- Goofy suggestion when trying to use a raw ptr receiver and also the self keyword in the body HOT 1
- Tracking Issue for Contracts
- Vetting 3rd party crates for supply-chain-security issues
- Error when compiling `cdylib` using `JNI` HOT 13
- Did miri spot a concurrency bug taking RwLockWriteGuard? HOT 1
- dead-code false positive on named structs with a never field HOT 11
- compiletest: error if `-Cincremental` is passed in compile-flags in ui tests HOT 2
- compiletest: don't silently accept unsupported directives in test suites
- Type parameter captured inside closure may not live long enough HOT 2
- Error when running windows .exe compiled on linux HOT 6
- global_asm-implemented extern "C" functions are not exported from dylib crates HOT 5
- UdpSocket `recv()` fails after `send()` to a closed port HOT 3
- Compiler crash when trying to compile Zed HOT 9
- The `slice::chunks_exact` iterator does not optimize when the initial slice is non-empty
- Invalid cast error when trying to cast a closure to a function pointer should mention captured variables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.