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`
Backtrace
```
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 - ::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::>::{closure#0}
12: 0x7f0d4f6d7e76 - as core::ops::function::Fn>::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 - >, &mut rustc_infer[abd41066181445be]::infer::snapshot::undo_log::InferCtxtUndoLogs>>>::uninlined_get_root_key.llvm.6537034541696690420.cold
20: 0x7f0d507a0045 - >::fold_ty
21: 0x7f0d53dd6b38 - >::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::>
24: 0x7f0d53ba93c6 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::, 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::>
28: 0x7f0d53ba936a - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::, 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 - ::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::>
34: 0x7f0d53a5ef2d - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::>, 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::>
38: 0x7f0d5462b022 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::>, 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::, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}
41: 0x7f0d54489f8b - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_begin_short_backtrace::, 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 - <::spawn_unchecked_, 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 - as core::ops::function::FnOnce>::call_once::h09e5a4c541afa800
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
44: 0x7f0d4f6e1cab - as core::ops::function::FnOnce>::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 -
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
```
Code
Meta
rustc --version --verbose
:Error output
Backtrace
``` 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 -::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::>::{closure#0}
12: 0x7f0d4f6d7e76 - as core::ops::function::Fn>::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 - >, &mut rustc_infer[abd41066181445be]::infer::snapshot::undo_log::InferCtxtUndoLogs>>>::uninlined_get_root_key.llvm.6537034541696690420.cold
20: 0x7f0d507a0045 - >::fold_ty
21: 0x7f0d53dd6b38 - >::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::>
24: 0x7f0d53ba93c6 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::, 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::>
28: 0x7f0d53ba936a - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::, 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 - ::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::>
34: 0x7f0d53a5ef2d - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::>, 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::>
38: 0x7f0d5462b022 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::>, 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::, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}
41: 0x7f0d54489f8b - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_begin_short_backtrace::, 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 - <::spawn_unchecked_, 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 - as core::ops::function::FnOnce>::call_once::h09e5a4c541afa800
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
44: 0x7f0d4f6e1cab - as core::ops::function::FnOnce>::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 -
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
```