Closed
Description
auto-reduced (treereduce-rust):
#![feature(non_lifetime_binders)]
trait v0<> {}
fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
original:
#![feature(non_lifetime_binders)]
trait v0<> {}
fn kind :(v0<'_, v2 = impl v0<v4> + '_> impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
Version information
rustc 1.83.0-nightly (0321e73d1 2024-10-11)
binary: rustc
commit-hash: 0321e73d1cb3f739caa806927344eca6f96257b5
commit-date: 2024-10-11
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.1
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
error: missing parameters for function definition
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:8
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^
|
help: add a parameter list
|
3 | fn kind() :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ++
error: return types are denoted using `->`
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:10
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^
|
help: use `->` instead
|
3 | fn kind -> (v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ~~
error: expected one of `!`, `)`, `+`, `,`, or `::`, found keyword `impl`
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:21
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| -^^^^ expected one of `!`, `)`, `+`, `,`, or `::`
| |
| help: missing `,`
error[E0106]: missing lifetime specifiers
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:15
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^^ ^^ ^^ expected named lifetime parameter
| | |
| | expected named lifetime parameter
| expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
3 | fn kind :(v0<'static, > impl for<v4> v0<'static, v2 = impl v0<v4> + 'static>) {}
| ~~~~~~~ ~~~~~~~ ~~~~~~~
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:1:12
|
1 | #![feature(non_lifetime_binders)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: trait `v0` should have an upper camel case name
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:2:7
|
2 | trait v0<> {}
| ^^ help: convert the identifier to upper camel case (notice the capitalization): `V0`
|
= note: `#[warn(non_camel_case_types)]` on by default
warning: type parameter `v4` should have an upper camel case name
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:30
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^^ help: convert the identifier to upper camel case (notice the capitalization): `V4`
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:67
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs`
warning: trait objects without an explicit `dyn` are deprecated
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:12
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^^^^^^^^
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
= note: `#[warn(bare_trait_objects)]` on by default
help: if this is a dyn-compatible trait, use `dyn`
|
3 | fn kind :(dyn v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| +++
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:12
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^^------ help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
|
note: trait defined here, with 0 lifetime parameters
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:2:7
|
2 | trait v0<> {}
| ^^
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:34
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^^--------------------------- help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
|
note: trait defined here, with 0 lifetime parameters
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:2:7
|
2 | trait v0<> {}
| ^^
error[E0220]: associated type `v2` not found for `v0`
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:41
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^^ associated type `v2` not found
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:3:51
|
3 | fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
| ^^---- help: remove the unnecessary generics
| |
| expected 0 generic arguments
|
note: trait defined here, with 0 generic parameters
--> /tmp/icemaker_global_tempdir.iM3UDTgNb65b/rustc_testrunner_tmpdir_reporting.HNNM9m0OzIzi/mvce.rs:2:7
|
2 | trait v0<> {}
| ^^
thread 'rustc' panicked at compiler/rustc_middle/src/ty/predicate.rs:489:9:
`WellFormed(^2_"v4")` has escaping bound vars, so it cannot be wrapped in a dummy binder.
stack backtrace:
0: 0x7ad8ec3de57a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h0c0d2e67483a7ce1
1: 0x7ad8ecc034a6 - core::fmt::write::h19fbfdd1fd25c23b
2: 0x7ad8edec4091 - std::io::Write::write_fmt::hf8ab2da8ebc932a0
3: 0x7ad8ec3de3d2 - std::sys::backtrace::BacktraceLock::print::h3d864635116d695a
4: 0x7ad8ec3e08a6 - std::panicking::default_hook::{{closure}}::h2aa94d113a45cc15
5: 0x7ad8ec3e06f0 - std::panicking::default_hook::h97fbe8692dbb54b4
6: 0x7ad8eb4331df - std[b2c81c0a9485f2e4]::panicking::update_hook::<alloc[c9d20cda7901ded3]::boxed::Box<rustc_driver_impl[8c3cd927c140555]::install_ice_hook::{closure#0}>>::{closure#0}
7: 0x7ad8ec3e0fb8 - std::panicking::rust_panic_with_hook::hc4ff1f67175d51bb
8: 0x7ad8ec3e0d8a - std::panicking::begin_panic_handler::{{closure}}::h064adafafa3d3d91
9: 0x7ad8ec3dea29 - std::sys::backtrace::__rust_end_short_backtrace::hfd346037bc0f3979
10: 0x7ad8ec3e0a4c - rust_begin_unwind
11: 0x7ad8e9e4cd00 - core::panicking::panic_fmt::hcd11b748a515a987
12: 0x7ad8ee656148 - <rustc_middle[3ffb7b0bf421448c]::ty::predicate::Predicate as rustc_type_ir[89eb6eb643500842]::upcast::UpcastFrom<rustc_middle[3ffb7b0bf421448c]::ty::context::TyCtxt, rustc_type_ir[89eb6eb643500842]::predicate_kind::PredicateKind<rustc_middle[3ffb7b0bf421448c]::ty::context::TyCtxt>>>::upcast_from.cold
13: 0x7ad8eb4fe177 - <rustc_infer[e8941da21ab8c6f3]::traits::Obligation<rustc_middle[3ffb7b0bf421448c]::ty::predicate::Predicate>>::with_depth::<rustc_type_ir[89eb6eb643500842]::predicate_kind::PredicateKind<rustc_middle[3ffb7b0bf421448c]::ty::context::TyCtxt>>
14: 0x7ad8eb6171fe - <rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck as rustc_hir[a68747c3d7069c6f]::intravisit::Visitor>::visit_ty
15: 0x7ad8eb5c9bed - <rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck as rustc_hir[a68747c3d7069c6f]::intravisit::Visitor>::visit_generic_args
16: 0x7ad8eb526bb0 - rustc_hir[a68747c3d7069c6f]::intravisit::walk_poly_trait_ref::<rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck>
17: 0x7ad8eb61778e - <rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck as rustc_hir[a68747c3d7069c6f]::intravisit::Visitor>::visit_ty
18: 0x7ad8eb5c9ce4 - <rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck as rustc_hir[a68747c3d7069c6f]::intravisit::Visitor>::visit_generic_args
19: 0x7ad8eb526bb0 - rustc_hir[a68747c3d7069c6f]::intravisit::walk_poly_trait_ref::<rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck>
20: 0x7ad8eb61778e - <rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck as rustc_hir[a68747c3d7069c6f]::intravisit::Visitor>::visit_ty
21: 0x7ad8eb6174d1 - <rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check::HirWfCheck as rustc_hir[a68747c3d7069c6f]::intravisit::Visitor>::visit_ty
22: 0x7ad8eb616b8e - rustc_hir_analysis[94092c3b015c4ea3]::hir_wf_check::diagnostic_hir_wf_check
23: 0x7ad8ebed55cc - rustc_query_impl[fa1174e4896087c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[fa1174e4896087c1]::query_impl::diagnostic_hir_wf_check::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 8usize]>>
24: 0x7ad8ebeba6c3 - <rustc_query_impl[fa1174e4896087c1]::query_impl::diagnostic_hir_wf_check::dynamic_query::{closure#2} as core[15204f05ba262a1b]::ops::function::FnOnce<(rustc_middle[3ffb7b0bf421448c]::ty::context::TyCtxt, (rustc_middle[3ffb7b0bf421448c]::ty::predicate::Predicate, rustc_middle[3ffb7b0bf421448c]::traits::WellFormedLoc))>>::call_once
25: 0x7ad8ebe341ba - rustc_query_system[3cba1a04b5b15b8a]::query::plumbing::try_execute_query::<rustc_query_impl[fa1174e4896087c1]::DynamicConfig<rustc_query_system[3cba1a04b5b15b8a]::query::caches::DefaultCache<(rustc_middle[3ffb7b0bf421448c]::ty::predicate::Predicate, rustc_middle[3ffb7b0bf421448c]::traits::WellFormedLoc), rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[fa1174e4896087c1]::plumbing::QueryCtxt, false>
26: 0x7ad8ebf15af5 - rustc_query_impl[fa1174e4896087c1]::query_impl::diagnostic_hir_wf_check::get_query_non_incr::__rust_end_short_backtrace
27: 0x7ad8ec206ac9 - <rustc_trait_selection[9580d8cfdaacc399]::error_reporting::TypeErrCtxt>::report_selection_error
28: 0x7ad8ec28809b - <rustc_trait_selection[9580d8cfdaacc399]::error_reporting::TypeErrCtxt>::report_fulfillment_error
29: 0x7ad8ec24f277 - <rustc_trait_selection[9580d8cfdaacc399]::error_reporting::TypeErrCtxt>::report_fulfillment_errors
30: 0x7ad8ecdf114d - <rustc_trait_selection[9580d8cfdaacc399]::traits::engine::ObligationCtxt<rustc_trait_selection[9580d8cfdaacc399]::traits::FulfillmentError>>::assumed_wf_types_and_report_errors
31: 0x7ad8ed380ef5 - rustc_hir_analysis[94092c3b015c4ea3]::check::wfcheck::check_item_fn
32: 0x7ad8ea5c061f - rustc_hir_analysis[94092c3b015c4ea3]::check::wfcheck::check_well_formed
33: 0x7ad8ed5cee6b - rustc_query_impl[fa1174e4896087c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[fa1174e4896087c1]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 1usize]>>
34: 0x7ad8ed5ce5d1 - rustc_query_system[3cba1a04b5b15b8a]::query::plumbing::try_execute_query::<rustc_query_impl[fa1174e4896087c1]::DynamicConfig<rustc_query_system[3cba1a04b5b15b8a]::query::caches::VecCache<rustc_span[6af75d8d312d6eec]::def_id::LocalDefId, rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[fa1174e4896087c1]::plumbing::QueryCtxt, false>
35: 0x7ad8ed5ce250 - rustc_query_impl[fa1174e4896087c1]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
36: 0x7ad8ed5cf0ff - rustc_hir_analysis[94092c3b015c4ea3]::check::wfcheck::check_mod_type_wf
37: 0x7ad8ed5cef25 - rustc_query_impl[fa1174e4896087c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[fa1174e4896087c1]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 1usize]>>
38: 0x7ad8ed9b7b7b - rustc_query_system[3cba1a04b5b15b8a]::query::plumbing::try_execute_query::<rustc_query_impl[fa1174e4896087c1]::DynamicConfig<rustc_query_system[3cba1a04b5b15b8a]::query::caches::DefaultCache<rustc_span[6af75d8d312d6eec]::def_id::LocalModDefId, rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[fa1174e4896087c1]::plumbing::QueryCtxt, false>
39: 0x7ad8ed9b792d - rustc_query_impl[fa1174e4896087c1]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
40: 0x7ad8ed0340fb - rustc_hir_analysis[94092c3b015c4ea3]::check_crate
41: 0x7ad8ed030e57 - rustc_interface[b91e754c6773c007]::passes::run_required_analyses
42: 0x7ad8ed71fb1e - rustc_interface[b91e754c6773c007]::passes::analysis
43: 0x7ad8ed71faf1 - rustc_query_impl[fa1174e4896087c1]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[fa1174e4896087c1]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 1usize]>>
44: 0x7ad8edb26dae - rustc_query_system[3cba1a04b5b15b8a]::query::plumbing::try_execute_query::<rustc_query_impl[fa1174e4896087c1]::DynamicConfig<rustc_query_system[3cba1a04b5b15b8a]::query::caches::SingleCache<rustc_middle[3ffb7b0bf421448c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[fa1174e4896087c1]::plumbing::QueryCtxt, false>
45: 0x7ad8edb26a8f - rustc_query_impl[fa1174e4896087c1]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
46: 0x7ad8ed94edde - rustc_interface[b91e754c6773c007]::interface::run_compiler::<core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>, rustc_driver_impl[8c3cd927c140555]::run_compiler::{closure#0}>::{closure#1}
47: 0x7ad8eda32d10 - std[b2c81c0a9485f2e4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[b91e754c6773c007]::util::run_in_thread_with_globals<rustc_interface[b91e754c6773c007]::util::run_in_thread_pool_with_globals<rustc_interface[b91e754c6773c007]::interface::run_compiler<core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>, rustc_driver_impl[8c3cd927c140555]::run_compiler::{closure#0}>::{closure#1}, core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>>::{closure#0}, core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>>
48: 0x7ad8eda333d7 - <<std[b2c81c0a9485f2e4]::thread::Builder>::spawn_unchecked_<rustc_interface[b91e754c6773c007]::util::run_in_thread_with_globals<rustc_interface[b91e754c6773c007]::util::run_in_thread_pool_with_globals<rustc_interface[b91e754c6773c007]::interface::run_compiler<core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>, rustc_driver_impl[8c3cd927c140555]::run_compiler::{closure#0}>::{closure#1}, core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>>::{closure#0}, core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[15204f05ba262a1b]::result::Result<(), rustc_span[6af75d8d312d6eec]::ErrorGuaranteed>>::{closure#1} as core[15204f05ba262a1b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
49: 0x7ad8eda342c1 - std::sys::pal::unix::thread::Thread::new::thread_start::h4694c2beab690665
50: 0x7ad8ef1c739d - <unknown>
51: 0x7ad8ef24c49c - <unknown>
52: 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.83.0-nightly (0321e73d1 2024-10-11) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [diagnostic_hir_wf_check] performing HIR wf-checking for predicate `Binder { value: TraitPredicate(<dyn v0 as core::marker::Sized>, polarity:Positive), bound_vars: [] }` at item `Param { function: DefId(0:4 ~ mvce[ff9f]::kind), param_idx: 0 }`
#1 [check_well_formed] checking that `kind` is well-formed
end of query stack
error: aborting due to 9 previous errors; 4 warnings emitted
Some errors have detailed explanations: E0106, E0107, E0220, E0601.
For more information about an error, try `rustc --explain E0106`.
@rustbot label +F-non_lifetime_binders