Closed
Description
can't compile linfa, please show me how to fix
Code
<code>
Meta
rustc --version --verbose
:
rustc 1.73.0-nightly (6ef7d16be 2023-08-19)
binary: rustc
commit-hash: 6ef7d16be0fb9d6ecf300c27990f4bff49d22d46
commit-date: 2023-08-19
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 17.0.0
Error output
error: internal compiler error: no errors encountered even though `delay_span_bug` issued
Backtrace
error: internal compiler error: no errors encountered even though `delay_span_bug` issued
error: internal compiler error: unresolved inference variable in outlives: ?4t
--> /public/home/litz/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2/linfa-0.6.1/src/dataset/iter.rs:72:5
|
72 | fn next(&mut self) -> Option<Self::Item> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: delayed at compiler/rustc_infer/src/infer/outlives/obligations.rs:254:35
0: <rustc_errors::HandlerInner>::emit_diagnostic
1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
2: <rustc_infer::infer::outlives::obligations::TypeOutlives<&rustc_infer::infer::InferCtxt>>::components_must_outlive
3: <rustc_infer::infer::InferCtxt>::resolve_regions
4: rustc_hir_analysis::check::compare_impl_item::compare_method_predicate_entailment
5: rustc_hir_analysis::check::check::check_mod_item_types
6: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
7: <rustc_query_impl::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalModDefId)>>::call_once
8: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalModDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
9: rustc_query_impl::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
10: <rustc_middle::hir::map::Map>::for_each_module::<rustc_hir_analysis::check_crate::{closure#6}::{closure#0}>
11: rustc_hir_analysis::check_crate
12: rustc_interface::passes::analysis
13: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
14: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
15: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
16: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
17: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#6}>
18: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
19: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
20: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/6ef7d16be0fb9d6ecf300c27990f4bff49d22d46/library/alloc/src/boxed.rs:2007:9
22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/6ef7d16be0fb9d6ecf300c27990f4bff49d22d46/library/alloc/src/boxed.rs:2007:9
23: std::sys::unix::thread::Thread::new::thread_start
at /rustc/6ef7d16be0fb9d6ecf300c27990f4bff49d22d46/library/std/src/sys/unix/thread.rs:108:17
24: start_thread
25: clone
--> /public/home/litz/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2/linfa-0.6.1/src/dataset/iter.rs:72:5
|
72 | fn next(&mut self) -> Option<Self::Item> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 attach the file at `/public/home/litz/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-4f7dbcce21e258a2/linfa-0.6.1/rustc-ice-2023-08-20T17:30:52.267253091Z-814448.txt` to your bug report
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `linfa` (lib)