mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
fixing clippy reference
This commit is contained in:
@@ -41,7 +41,7 @@ fn needs_turbofish<'tcx>(cx: &LateContext<'tcx>, expr: &hir::Expr<'tcx>) -> bool
|
||||
if !fn_return_ty
|
||||
.skip_binder()
|
||||
.walk()
|
||||
.any(|generic| generic.as_type().is_some_and(Ty::is_impl_trait)) =>
|
||||
.any(|generic| generic.as_type().is_some_and(Ty::is_opaque)) =>
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
@@ -207,7 +207,7 @@ fn fn_inputs_has_impl_trait_ty(cx: &LateContext<'_>, def_id: LocalDefId) -> bool
|
||||
inputs.iter().any(|input| {
|
||||
matches!(
|
||||
input.kind(),
|
||||
&ty::Alias(ty::AliasTy { kind: ty::Free{def_id} , ..}) if cx.tcx.type_of(def_id).skip_binder().is_impl_trait()
|
||||
&ty::Alias(ty::AliasTy { kind: ty::Free{def_id} , ..}) if cx.tcx.type_of(def_id).skip_binder().is_opaque()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user