about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-10-04 09:43:34 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-10-04 14:10:44 +0000
commitda16cc1da9814710e637ff242b71768a4d3724b7 (patch)
treedaab85aa3abe1264d8afc815723af985fa7a7c92
parent9e8f53d09af61d38d6de42450dbf6910982d3ea9 (diff)
downloadrust-da16cc1da9814710e637ff242b71768a4d3724b7.tar.gz
rust-da16cc1da9814710e637ff242b71768a4d3724b7.zip
It's not about types or consts, but the lack of regions
-rw-r--r--clippy_lints/src/dereference.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/dereference.rs b/clippy_lints/src/dereference.rs
index e54d71fc8e4..f0d5ed6f594 100644
--- a/clippy_lints/src/dereference.rs
+++ b/clippy_lints/src/dereference.rs
@@ -1238,7 +1238,7 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
             ty::Adt(..) if ty.has_placeholders() || ty.has_opaque_types() => {
                 Position::ReborrowStable(precedence).into()
             },
-            ty::Adt(_, substs) if substs.has_param_types_or_consts() => {
+            ty::Adt(_, substs) if substs.has_non_region_param() => {
                 TyPosition::new_deref_stable_for_result(precedence, ty)
             },
             ty::Bool