Skip to content

type parameter Args/#1 (Args/1) out of range when substituting #10235

Open
@he-thinks

Description

@he-thinks

Summary

Internal compiler error: compiler\rustc_middle\src\ty\subst.rs:726:9: type parameter Args/#1 (Args/1) out of range when substituting, substs=[dyn std::ops::FnMut(hir_def::AssocItemId) -> std::ops::ControlFlow<()>] when trying to use cargo lint

Steps to reproduce:

git clone https://github.com/rust-lang/rust-analyzer.git
cd rust-analyzer
cargo lint

Version

rustc 1.66.1 (90743e729 2023-01-10)
binary: rustc
commit-hash: 90743e7298aca107ddaa0c202a4d3604e29bfeb6
commit-date: 2023-01-10
host: x86_64-pc-windows-gnu
release: 1.66.1
LLVM version: 15.0.2

Error output

Backtrace

# ... warnings from rust-clippy, then:
error: internal compiler error: compiler\rustc_middle\src\ty\subst.rs:726:9: type parameter `Args/#1` (Args/1) out of range when substituting, substs=[dyn std::ops::FnMut(hir_def::AssocItemId) -> std::ops::ControlFlow<()>]

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6\compiler\rustc_errors\src\lib.rs:1519:9
stack backtrace:
 0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
 1: std::panic::panic_any::<rustc_errors::ExplicitBug>
 2: <rustc_errors::HandlerInner>::bug::<&alloc::string::String>
 3: <rustc_errors::Handler>::bug::<&alloc::string::String>
 4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
 5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
 6: rustc_middle::util::bug::bug_fmt
 7: <rustc_middle::ty::subst::SubstFolder>::type_param_out_of_range
 8: <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::TypeFolder>::fold_ty
 9: <&rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg> as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_middle::ty::subst::SubstFolder>
10: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_middle::ty::subst::SubstFolder>
11: <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_binder::<rustc_middle::ty::PredicateKind>
12: <alloc::vec::Vec<rustc_middle::ty::Predicate> as alloc::vec::spec_extend::SpecExtend<rustc_middle::ty::Predicate, core::iter::adapters::map::Map<core::slice::iter::Iter<(rustc_middle::ty::Predicate, rustc_span::span_encoding::Span)>, <rustc_middle::ty::generics::GenericPredicates>::instantiate_into::{closure#0}>>>::spec_extend
13: <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
14: <rustc_middle::ty::generics::GenericPredicates>::instantiate
15: <rustc_trait_selection::traits::select::SelectionContext>::confirm_candidate
16: <rustc_infer::infer::InferCtxt>::probe::<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, <rustc_trait_selection::traits::select::SelectionContext>::evaluation_probe<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}>::{closure#0}>
17: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_stack
18: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_trait_selection::traits::select::SelectionContext>::in_task<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively::{closure#0}::{closure#2}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>::{closure#0}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
19: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_anon_task::<rustc_middle::ty::context::TyCtxt, <rustc_trait_selection::traits::select::SelectionContext>::in_task<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively::{closure#0}::{closure#2}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>::{closure#0}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
20: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
21: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_predicate_recursively
22: <rustc_infer::infer::InferCtxt>::probe::<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, <rustc_trait_selection::traits::select::SelectionContext>::evaluation_probe<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation::{closure#0}>::{closure#0}>
23: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation
24: rustc_traits::evaluate_obligation::evaluate_obligation
25: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, rustc_middle::infer::canonical::Canonical<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Predicate>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>::{closure#0}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
26: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::infer::canonical::Canonical<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Predicate>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
27: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::infer::canonical::Canonical<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Predicate>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>>
28: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::evaluate_obligation, rustc_query_impl::plumbing::QueryCtxt>
29: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation
30: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
31: <rustc_infer::infer::InferCtxt as rustc_trait_selection::infer::InferCtxtExt>::type_implements_trait
32: clippy_utils::ty::implements_trait_with_env
33: clippy_utils::ty::implements_trait
34: <clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr::{closure#2}>::{closure#0} as core::ops::function::FnOnce<(&mut rustc_errors::diagnostic_builder::DiagnosticBuilder<()>,)>>::call_once::{shim:vtable#0}
35: rustc_middle::lint::struct_lint_level::struct_lint_level_impl::<&str>
36: <rustc_middle::ty::context::TyCtxt>::struct_span_lint_hir::<rustc_span::span_encoding::Span, &str, clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr::{closure#2}>::{closure#0}>
37: clippy_utils::diagnostics::span_lint_and_then::<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr::{closure#2}>
38: <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr
39: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_expr
40: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
41: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
42: rustc_hir::intravisit::walk_stmt::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
43: rustc_hir::intravisit::walk_block::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
44: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
45: rustc_hir::intravisit::walk_body::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
46: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_body
47: rustc_hir::intravisit::walk_impl_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
48: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_impl_item
49: rustc_hir::intravisit::walk_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
50: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
51: rustc_lint::late::late_lint_pass_crate::<rustc_lint::late::LateLintPassObjects>
52: rustc_lint::late::late_lint_crate::<rustc_lint::BuiltinCombinedLateLintPass>
53: <rustc_session::session::Session>::time::<(), rustc_lint::late::check_crate<rustc_lint::BuiltinCombinedLateLintPass, rustc_interface::passes::analysis::{closure#5}::{closure#1}::{closure#2}::{closure#0}::{closure#0}>::{closure#0}::{closure#0}>
54: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}::{closure#1}::{closure#2}::{closure#0}>
55: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::analysis::{closure#5}::{closure#1}> as core::ops::function::FnOnce<()>>::call_once
56: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}>
57: rustc_interface::passes::analysis
58: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
59: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
60: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
61: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
62: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
63: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
64: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.66 (90743e72 2023-01-10)

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `dyn core::ops::function::FnMut(hir_def::AssocItemId) -> core::ops::control_flow::ControlFlow<()>: core::ops::function::FnMut`
#1 [analysis] running analysis passes on this crate
end of query stack
warning: `hir` (lib) generated 19 warnings
error: could not compile `hir`; 19 warnings emitted
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6\compiler\rustc_errors\src\lib.rs:1519:9
stack backtrace:
 0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
 1: std::panic::panic_any::<rustc_errors::ExplicitBug>
 2: <rustc_errors::HandlerInner>::bug::<&alloc::string::String>
 3: <rustc_errors::Handler>::bug::<&alloc::string::String>
 4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
 5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
 6: rustc_middle::util::bug::bug_fmt
 7: <rustc_middle::ty::subst::SubstFolder>::type_param_out_of_range
 8: <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::TypeFolder>::fold_ty
 9: <&rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg> as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_middle::ty::subst::SubstFolder>
10: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_middle::ty::subst::SubstFolder>
11: <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_binder::<rustc_middle::ty::PredicateKind>
12: <alloc::vec::Vec<rustc_middle::ty::Predicate> as alloc::vec::spec_extend::SpecExtend<rustc_middle::ty::Predicate, core::iter::adapters::map::Map<core::slice::iter::Iter<(rustc_middle::ty::Predicate, rustc_span::span_encoding::Span)>, <rustc_middle::ty::generics::GenericPredicates>::instantiate_into::{closure#0}>>>::spec_extend
13: <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
14: <rustc_middle::ty::generics::GenericPredicates>::instantiate
15: <rustc_trait_selection::traits::select::SelectionContext>::confirm_candidate
16: <rustc_infer::infer::InferCtxt>::probe::<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, <rustc_trait_selection::traits::select::SelectionContext>::evaluation_probe<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}>::{closure#0}>
17: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_stack
18: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_trait_selection::traits::select::SelectionContext>::in_task<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively::{closure#0}::{closure#2}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>::{closure#0}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
19: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_anon_task::<rustc_middle::ty::context::TyCtxt, <rustc_trait_selection::traits::select::SelectionContext>::in_task<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively::{closure#0}::{closure#2}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>::{closure#0}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
20: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
21: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_predicate_recursively
22: <rustc_infer::infer::InferCtxt>::probe::<core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>, <rustc_trait_selection::traits::select::SelectionContext>::evaluation_probe<<rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation::{closure#0}>::{closure#0}>
23: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation
24: rustc_traits::evaluate_obligation::evaluate_obligation
25: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, rustc_middle::infer::canonical::Canonical<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Predicate>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>::{closure#0}, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
26: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::infer::canonical::Canonical<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Predicate>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
27: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::infer::canonical::Canonical<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Predicate>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>>
28: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::evaluate_obligation, rustc_query_impl::plumbing::QueryCtxt>
29: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation
30: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
31: <rustc_infer::infer::InferCtxt as rustc_trait_selection::infer::InferCtxtExt>::type_implements_trait
32: clippy_utils::ty::implements_trait_with_env
33: clippy_utils::ty::implements_trait
34: <clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr::{closure#2}>::{closure#0} as core::ops::function::FnOnce<(&mut rustc_errors::diagnostic_builder::DiagnosticBuilder<()>,)>>::call_once::{shim:vtable#0}
35: rustc_middle::lint::struct_lint_level::struct_lint_level_impl::<&str>
36: <rustc_middle::ty::context::TyCtxt>::struct_span_lint_hir::<rustc_span::span_encoding::Span, &str, clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr::{closure#2}>::{closure#0}>
37: clippy_utils::diagnostics::span_lint_and_then::<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr::{closure#2}>
38: <clippy_lints::eta_reduction::EtaReduction as rustc_lint::passes::LateLintPass>::check_expr
39: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_expr
40: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
41: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
42: rustc_hir::intravisit::walk_stmt::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
43: rustc_hir::intravisit::walk_block::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
44: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
45: rustc_hir::intravisit::walk_body::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
46: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_body
47: rustc_hir::intravisit::walk_impl_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
48: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_impl_item
49: rustc_hir::intravisit::walk_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
50: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
51: rustc_lint::late::late_lint_pass_crate::<rustc_lint::late::LateLintPassObjects>
52: rustc_lint::late::late_lint_crate::<rustc_lint::BuiltinCombinedLateLintPass>
53: <rustc_session::session::Session>::time::<(), rustc_lint::late::check_crate<rustc_lint::BuiltinCombinedLateLintPass, rustc_interface::passes::analysis::{closure#5}::{closure#1}::{closure#2}::{closure#0}::{closure#0}>::{closure#0}::{closure#0}>
54: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}::{closure#1}::{closure#2}::{closure#0}>
55: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::analysis::{closure#5}::{closure#1}> as core::ops::function::FnOnce<()>>::call_once
56: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}>
57: rustc_interface::passes::analysis
58: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
59: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
60: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
61: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
62: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
63: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
64: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.66 (90743e72 2023-01-10)

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `dyn core::ops::function::FnMut(hir_def::AssocItemId) -> core::ops::control_flow::ControlFlow<()>: core::ops::function::FnMut`
#1 [analysis] running analysis passes on this crate
end of query stack
warning: `hir` (lib test) generated 19 warnings (19 duplicates)
error: could not compile `hir`; 19 warnings emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingE-needs-mcveCall for participation: This issue needs a Minimal Complete and Verifiable ExampleI-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions