Skip to content

Commit da16cc1

Browse files
committed
It's not about types or consts, but the lack of regions
1 parent 9e8f53d commit da16cc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/dereference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
12381238
ty::Adt(..) if ty.has_placeholders() || ty.has_opaque_types() => {
12391239
Position::ReborrowStable(precedence).into()
12401240
},
1241-
ty::Adt(_, substs) if substs.has_param_types_or_consts() => {
1241+
ty::Adt(_, substs) if substs.has_non_region_param() => {
12421242
TyPosition::new_deref_stable_for_result(precedence, ty)
12431243
},
12441244
ty::Bool

0 commit comments

Comments
 (0)