Skip to content

Commit dcca5d5

Browse files
Update clippy to handle TyAlias
1 parent 4815a60 commit dcca5d5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tools/clippy/clippy_lints/src/dereference.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,11 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
13231323
ty::Infer(_) | ty::Error(_) | ty::Bound(..) | ty::Opaque(..) | ty::Placeholder(_) | ty::Dynamic(..) => {
13241324
Position::ReborrowStable(precedence).into()
13251325
},
1326+
ty::TyAlias(def_id, substs) => {
1327+
let binder_ty = cx.tcx.bound_type_of(def_id);
1328+
ty = binder_ty.subst(cx.tcx, substs);
1329+
continue;
1330+
}
13261331
ty::Adt(..) if ty.has_placeholders() || ty.has_opaque_types() => {
13271332
Position::ReborrowStable(precedence).into()
13281333
},

0 commit comments

Comments
 (0)