Skip to content

Commit 1b6738b

Browse files
committed
s/is_dyn_trait/is_dyn_any
1 parent b0dfecd commit 1b6738b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/type_id_on_box.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_middle::ty::Ty;
1010
use rustc_middle::ty::{self, ExistentialPredicate};
1111
use rustc_span::{sym, Span};
1212

13-
fn is_dyn_trait(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
13+
fn is_dyn_any(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
1414
if let ty::Dynamic(preds, ..) = ty.kind() {
1515
preds.iter().any(|p| match p.skip_binder() {
1616
ExistentialPredicate::Trait(tr) => cx.tcx.is_diagnostic_item(sym::Any, tr.def_id),
@@ -28,7 +28,7 @@ pub(super) fn check(cx: &LateContext<'_>, receiver: &Expr<'_>, call_span: Span)
2828
&& let ty::Ref(_, ty, _) = recv_ty.kind()
2929
&& let ty::Adt(adt, substs) = ty.kind()
3030
&& adt.is_box()
31-
&& is_dyn_trait(cx, substs.type_at(0))
31+
&& is_dyn_any(cx, substs.type_at(0))
3232
{
3333
span_lint_and_then(
3434
cx,

0 commit comments

Comments
 (0)