error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:7:48
|
7 | impl<'a, T> Foo for &T where Self::Item: Baz {}
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs`
error[E0046]: not all trait items implemented, missing: `Item`
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:6:1
|
3 | type Item;
| --------- `Item` from trait
...
6 | impl<'a, T> Foo for &'a T where Self::Item: 'a {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation
error[E0277]: the trait bound `&'a T: Foo` is not satisfied
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:6:21
|
6 | impl<'a, T> Foo for &'a T where Self::Item: 'a {}
| ^^^^^ the trait `Foo` is not implemented for `&'a T`
|
help: the trait `Foo` is not implemented for `&'a _`
but it is implemented for `&_`
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:6:1
|
6 | impl<'a, T> Foo for &'a T where Self::Item: 'a {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `&'a T: Foo` is not satisfied
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:6:45
|
6 | impl<'a, T> Foo for &'a T where Self::Item: 'a {}
| ^^ the trait `Foo` is not implemented for `&'a T`
|
help: the trait `Foo` is not implemented for `&'a _`
but it is implemented for `&_`
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:6:1
|
6 | impl<'a, T> Foo for &'a T where Self::Item: 'a {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0046]: not all trait items implemented, missing: `Item`
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:7:1
|
3 | type Item;
| --------- `Item` from trait
...
7 | impl<'a, T> Foo for &T where Self::Item: Baz {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation
error: cannot normalize `<&_ as Foo>::Item: '_`
--> /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:7:1
|
7 | impl<'a, T> Foo for &T where Self::Item: Baz {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
thread 'rustc' (1992211) panicked at /rustc-dev/621d76794c76fc21c0a6151fbc090120e0230a91/compiler/rustc_infer/src/infer/resolve.rs:174:18:
region resolution not performed
stack backtrace:
0: 0x7fedb0033fd3 - <<std[287527946f71f0bc]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[7477a31a1a34cc49]::fmt::Display>::fmt
1: 0x7fedb060e2c8 - core[7477a31a1a34cc49]::fmt::write
2: 0x7fedb004a9c6 - <std[287527946f71f0bc]::sys::stdio::unix::Stderr as std[287527946f71f0bc]::io::Write>::write_fmt
3: 0x7fedb000a048 - std[287527946f71f0bc]::panicking::default_hook::{closure#0}
4: 0x7fedb0027703 - std[287527946f71f0bc]::panicking::default_hook
5: 0x7fedaeffbb8a - std[287527946f71f0bc]::panicking::update_hook::<alloc[979041e9952e771b]::boxed::Box<rustc_driver_impl[517260a07841a630]::install_ice_hook::{closure#1}>>::{closure#0}
6: 0x7fedb00279e2 - std[287527946f71f0bc]::panicking::panic_with_hook
7: 0x7fedb000a108 - std[287527946f71f0bc]::panicking::panic_handler::{closure#0}
8: 0x7fedb0000dc9 - std[287527946f71f0bc]::sys::backtrace::__rust_end_short_backtrace::<std[287527946f71f0bc]::panicking::panic_handler::{closure#0}, !>
9: 0x7fedb000bbdd - __rustc[5ec7081ce87b032f]::rust_begin_unwind
10: 0x7fedacb0cfbc - core[7477a31a1a34cc49]::panicking::panic_fmt
11: 0x7fedad9263b4 - core[7477a31a1a34cc49]::option::expect_failed
12: 0x7fedb1aa827c - <rustc_infer[5a785d1c27494969]::infer::resolve::FullTypeResolver as rustc_type_ir[b93cf349b3a4f34d]::fold::FallibleTypeFolder<rustc_middle[725063e074f29df]::ty::context::TyCtxt>>::try_fold_region
13: 0x7fedaf15d304 - <rustc_middle[725063e074f29df]::ty::generic_args::GenericArg as rustc_type_ir[b93cf349b3a4f34d]::fold::TypeFoldable<rustc_middle[725063e074f29df]::ty::context::TyCtxt>>::try_fold_with::<rustc_infer[5a785d1c27494969]::infer::resolve::FullTypeResolver>
14: 0x7fedb19aac6e - <&rustc_middle[725063e074f29df]::ty::list::RawList<(), rustc_middle[725063e074f29df]::ty::generic_args::GenericArg> as rustc_type_ir[b93cf349b3a4f34d]::fold::TypeFoldable<rustc_middle[725063e074f29df]::ty::context::TyCtxt>>::try_fold_with::<rustc_infer[5a785d1c27494969]::infer::resolve::FullTypeResolver>
15: 0x7fedb19ab928 - rustc_hir_analysis[1a80394817eddfdd]::impl_wf_check::min_specialization::check_always_applicable
16: 0x7fedb0d9c9bc - rustc_hir_analysis[1a80394817eddfdd]::check::check::check_item_type
17: 0x7fedb0d9379c - rustc_hir_analysis[1a80394817eddfdd]::check::wfcheck::check_well_formed
18: 0x7fedb0d9376b - rustc_query_impl[f20b8284200e680a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f20b8284200e680a]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 1usize]>>
19: 0x7fedb0d931e3 - rustc_query_system[b7e73caa2c2ad9a]::query::plumbing::try_execute_query::<rustc_query_impl[f20b8284200e680a]::DynamicConfig<rustc_data_structures[e0d8483206daafa2]::vec_cache::VecCache<rustc_span[851f35e07e3c2dd4]::def_id::LocalDefId, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[b7e73caa2c2ad9a]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[f20b8284200e680a]::plumbing::QueryCtxt, false>
20: 0x7fedb0d92cd6 - rustc_query_impl[f20b8284200e680a]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
21: 0x7fedb0d90470 - rustc_hir_analysis[1a80394817eddfdd]::check::wfcheck::check_type_wf
22: 0x7fedb0d9035d - rustc_query_impl[f20b8284200e680a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f20b8284200e680a]::query_impl::check_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 1usize]>>
23: 0x7fedb17a3e85 - rustc_query_system[b7e73caa2c2ad9a]::query::plumbing::try_execute_query::<rustc_query_impl[f20b8284200e680a]::DynamicConfig<rustc_query_system[b7e73caa2c2ad9a]::query::caches::SingleCache<rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[f20b8284200e680a]::plumbing::QueryCtxt, false>
24: 0x7fedb17a3b36 - rustc_query_impl[f20b8284200e680a]::query_impl::check_type_wf::get_query_non_incr::__rust_end_short_backtrace
25: 0x7fedb113f316 - rustc_hir_analysis[1a80394817eddfdd]::check_crate
26: 0x7fedb07493db - rustc_interface[5c48368f5debe80d]::passes::analysis
27: 0x7fedb0749035 - rustc_query_impl[f20b8284200e680a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f20b8284200e680a]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 0usize]>>
28: 0x7fedb17a4be3 - rustc_query_system[b7e73caa2c2ad9a]::query::plumbing::try_execute_query::<rustc_query_impl[f20b8284200e680a]::DynamicConfig<rustc_query_system[b7e73caa2c2ad9a]::query::caches::SingleCache<rustc_middle[725063e074f29df]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[f20b8284200e680a]::plumbing::QueryCtxt, false>
29: 0x7fedb17a49ce - rustc_query_impl[f20b8284200e680a]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7fedb1982c11 - <rustc_interface[5c48368f5debe80d]::passes::create_and_enter_global_ctxt<core[7477a31a1a34cc49]::option::Option<rustc_interface[5c48368f5debe80d]::queries::Linker>, rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[7477a31a1a34cc49]::ops::function::FnOnce<(&rustc_session[eb79e6d3104f29ae]::session::Session, rustc_middle[725063e074f29df]::ty::context::CurrentGcx, alloc[979041e9952e771b]::sync::Arc<rustc_data_structures[e0d8483206daafa2]::jobserver::Proxy>, &std[287527946f71f0bc]::sync::once_lock::OnceLock<rustc_middle[725063e074f29df]::ty::context::GlobalCtxt>, &rustc_data_structures[e0d8483206daafa2]::sync::worker_local::WorkerLocal<rustc_middle[725063e074f29df]::arena::Arena>, &rustc_data_structures[e0d8483206daafa2]::sync::worker_local::WorkerLocal<rustc_hir[7eac7792dedc1861]::Arena>, rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
31: 0x7fedb17f5d34 - rustc_interface[5c48368f5debe80d]::interface::run_compiler::<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}
32: 0x7fedb175aa3a - std[287527946f71f0bc]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[5c48368f5debe80d]::util::run_in_thread_with_globals<rustc_interface[5c48368f5debe80d]::util::run_in_thread_pool_with_globals<rustc_interface[5c48368f5debe80d]::interface::run_compiler<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7fedb175a7fe - <std[287527946f71f0bc]::thread::lifecycle::spawn_unchecked<rustc_interface[5c48368f5debe80d]::util::run_in_thread_with_globals<rustc_interface[5c48368f5debe80d]::util::run_in_thread_pool_with_globals<rustc_interface[5c48368f5debe80d]::interface::run_compiler<(), rustc_driver_impl[517260a07841a630]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[7477a31a1a34cc49]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7fedb175c5c4 - <std[287527946f71f0bc]::sys::thread::unix::Thread>::new::thread_start
35: 0x7fedab09698b - <unknown>
36: 0x7fedab11a9cc - <unknown>
37: 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: rustc 1.95.0-nightly (621d76794 2026-01-18) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z next-solver=globally -Z dump-mir-dir=dir
query stack during panic:
#0 [check_well_formed] checking that `<impl at /tmp/icemaker_global_tempdir.UK6Vtl0oLgbn/rustc_testrunner_tmpdir_reporting.qm9kYHpAqItR/mvce.rs:7:1: 7:45>` is well-formed
#1 [check_type_wf] checking that types are well-formed
#2 [analysis] running analysis passes on crate `mvce`
end of query stack
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0046, E0277, E0601.
For more information about an error, try `rustc --explain E0046`.
auto-reduced (treereduce-rust):
original:
Version information
Possibly related line of code:
rust/compiler/rustc_infer/src/infer/resolve.rs
Lines 168 to 180 in 621d767
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Znext-solver=globallyProgram output
@rustbot label +F-min_specialization +WG-trait-system-refactor