Closed
Description
Code
trait Tr: for<'a> core::marker::Unsize<dyn Send + 'a> {}
Meta
stable & nightly on the playground
rustc 1.86.0-nightly
(2025-02-08 43ca9d18e333797f0aa3)
Error output
error[E0658]: use of unstable library feature `unsize`
--> src/lib.rs:1:19
|
1 | trait Tr: for<'a> core::marker::Unsize<dyn Send + 'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #18598 <https://github.com/rust-lang/rust/issues/18598> for more information
= help: add `#![feature(unsize)]` to the crate attributes to enable
= note: this compiler was built on 2025-02-08; consider upgrading it if it is out of date
thread 'rustc' panicked at compiler/rustc_middle/src/ty/predicate.rs:511:26:
`OutlivesPredicate(Self/#0, '^0.Named(DefId(0:4 ~ playground[9ecc]::Tr::'a), "'a"))` has escaping bound vars, so it cannot be wrapped in a dummy binder.
stack backtrace:
0: 0x745250c2bca0 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hc5635f23046b76ba
1: 0x7452514146e8 - core::fmt::write::h8d9b486d2f84f897
2: 0x74525276a751 - std::io::Write::write_fmt::h5d2df1f1aad7a1fa
3: 0x745250c2bb02 - std::sys::backtrace::BacktraceLock::print::h20873fceb1271ebd
4: 0x745250c2df82 - std::panicking::default_hook::{{closure}}::h473c4c64da501609
5: 0x745250c2de0a - std::panicking::default_hook::hfe03cbe80ffb957f
6: 0x74524fd87d89 - std[e4648c69fed4035]::panicking::update_hook::<alloc[20a132c6ea5c19b8]::boxed::Box<rustc_driver_impl[3962d31b440b66b1]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x745250c2eac3 - std::panicking::rust_panic_with_hook::h559ded9238de91ac
8: 0x745250c2e7ba - std::panicking::begin_panic_handler::{{closure}}::h2f028453bedb30de
9: 0x745250c2c189 - std::sys::backtrace::__rust_end_short_backtrace::h868f43e8be188708
10: 0x745250c2e47d - rust_begin_unwind
11: 0x74524d83ad60 - core::panicking::panic_fmt::hc20a54b31ac725a9
12: 0x745252f16bf7 - <rustc_type_ir[698d05cd811b4428]::binder::Binder<rustc_middle[d92dd94beadf619c]::ty::context::TyCtxt, rustc_type_ir[698d05cd811b4428]::predicate_kind::PredicateKind<rustc_middle[d92dd94beadf619c]::ty::context::TyCtxt>>>::dummy.llvm.10373651492484403108.cold
13: 0x745252181a51 - <rustc_trait_selection[a74f72e4f3d0146a]::traits::select::SelectionContext>::confirm_candidate
14: 0x74524dcacfc6 - <rustc_trait_selection[a74f72e4f3d0146a]::traits::select::SelectionContext>::evaluate_candidate::{closure#0}
15: 0x74524e14e1bd - <rustc_trait_selection[a74f72e4f3d0146a]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}::{closure#0}
16: 0x74524dafe4f0 - <rustc_trait_selection[a74f72e4f3d0146a]::traits::select::SelectionContext>::poly_select::{closure#0}
17: 0x74524db2237a - <rustc_trait_selection[a74f72e4f3d0146a]::traits::fulfill::FulfillProcessor>::process_trait_obligation
18: 0x745251d86255 - <rustc_trait_selection[a74f72e4f3d0146a]::traits::fulfill::FulfillProcessor as rustc_data_structures[7523fe6f2dac70c4]::obligation_forest::ObligationProcessor>::process_obligation
19: 0x745251407a4b - <rustc_data_structures[7523fe6f2dac70c4]::obligation_forest::ObligationForest<rustc_trait_selection[a74f72e4f3d0146a]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[a74f72e4f3d0146a]::traits::fulfill::FulfillProcessor>
20: 0x745251634769 - <rustc_trait_selection[a74f72e4f3d0146a]::traits::fulfill::FulfillmentContext<rustc_trait_selection[a74f72e4f3d0146a]::traits::FulfillmentError> as rustc_infer[8f56ccb33a028560]::traits::engine::TraitEngine<rustc_trait_selection[a74f72e4f3d0146a]::traits::FulfillmentError>>::select_all_or_error
21: 0x7452519680c8 - rustc_hir_analysis[aa789367b26c0eb]::check::wfcheck::check_trait
22: 0x7452519944f9 - rustc_hir_analysis[aa789367b26c0eb]::check::wfcheck::check_well_formed
23: 0x745251992e87 - rustc_query_impl[f637ed6b7fbb7da8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f637ed6b7fbb7da8]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d92dd94beadf619c]::query::erase::Erased<[u8; 1usize]>>
24: 0x745251992929 - rustc_query_system[1514a76b49778e5a]::query::plumbing::try_execute_query::<rustc_query_impl[f637ed6b7fbb7da8]::DynamicConfig<rustc_data_structures[7523fe6f2dac70c4]::vec_cache::VecCache<rustc_span[83d0441fcfbd64d1]::def_id::LocalDefId, rustc_middle[d92dd94beadf619c]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[1514a76b49778e5a]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[f637ed6b7fbb7da8]::plumbing::QueryCtxt, false>
25: 0x7452519923a2 - rustc_query_impl[f637ed6b7fbb7da8]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
26: 0x74525198ffde - rustc_hir_analysis[aa789367b26c0eb]::check::wfcheck::check_mod_type_wf
27: 0x74525198fde3 - rustc_query_impl[f637ed6b7fbb7da8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f637ed6b7fbb7da8]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d92dd94beadf619c]::query::erase::Erased<[u8; 1usize]>>
28: 0x74525239a184 - rustc_query_system[1514a76b49778e5a]::query::plumbing::try_execute_query::<rustc_query_impl[f637ed6b7fbb7da8]::DynamicConfig<rustc_query_system[1514a76b49778e5a]::query::caches::DefaultCache<rustc_span[83d0441fcfbd64d1]::def_id::LocalModDefId, rustc_middle[d92dd94beadf619c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[f637ed6b7fbb7da8]::plumbing::QueryCtxt, false>
29: 0x745252399f18 - rustc_query_impl[f637ed6b7fbb7da8]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
30: 0x745251802f2e - rustc_hir_analysis[aa789367b26c0eb]::check_crate
31: 0x7452517fde25 - rustc_interface[b314faa47f3f6498]::passes::run_required_analyses
32: 0x745251f0a95e - rustc_interface[b314faa47f3f6498]::passes::analysis
33: 0x745251f0a92f - rustc_query_impl[f637ed6b7fbb7da8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f637ed6b7fbb7da8]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d92dd94beadf619c]::query::erase::Erased<[u8; 0usize]>>
34: 0x7452523e0e15 - rustc_query_system[1514a76b49778e5a]::query::plumbing::try_execute_query::<rustc_query_impl[f637ed6b7fbb7da8]::DynamicConfig<rustc_query_system[1514a76b49778e5a]::query::caches::SingleCache<rustc_middle[d92dd94beadf619c]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[f637ed6b7fbb7da8]::plumbing::QueryCtxt, false>
35: 0x7452523e0b4e - rustc_query_impl[f637ed6b7fbb7da8]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
36: 0x74525235936b - rustc_interface[b314faa47f3f6498]::passes::create_and_enter_global_ctxt::<core[aa02c36eb0b8071]::option::Option<rustc_interface[b314faa47f3f6498]::queries::Linker>, rustc_driver_impl[3962d31b440b66b1]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
37: 0x7452523c5cdc - rustc_interface[b314faa47f3f6498]::interface::run_compiler::<(), rustc_driver_impl[3962d31b440b66b1]::run_compiler::{closure#0}>::{closure#1}
38: 0x7452522c9cc4 - std[e4648c69fed4035]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[b314faa47f3f6498]::util::run_in_thread_with_globals<rustc_interface[b314faa47f3f6498]::util::run_in_thread_pool_with_globals<rustc_interface[b314faa47f3f6498]::interface::run_compiler<(), rustc_driver_impl[3962d31b440b66b1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
39: 0x7452522c9999 - <<std[e4648c69fed4035]::thread::Builder>::spawn_unchecked_<rustc_interface[b314faa47f3f6498]::util::run_in_thread_with_globals<rustc_interface[b314faa47f3f6498]::util::run_in_thread_pool_with_globals<rustc_interface[b314faa47f3f6498]::interface::run_compiler<(), rustc_driver_impl[3962d31b440b66b1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[aa02c36eb0b8071]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
40: 0x7452522c912b - std::sys::pal::unix::thread::Thread::new::thread_start::h41002cfb9f6c33d1
41: 0x745253b08a94 - <unknown>
42: 0x745253b95a34 - clone
43: 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 make sure that you have updated to the latest nightly
note: please attach the file at `/playground/rustc-ice-2025-02-10T03_21_14-42.txt` to your bug report
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 [check_well_formed] checking that `Tr` is well-formed
#1 [check_mod_type_wf] checking that types are well-formed in top-level module
... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
For more information about this error, try `rustc --explain E0658`.
error: could not compile `playground` (lib) due to 1 previous error
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.Fixed by the next-generation trait solver, `-Znext-solver`.