about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-26 15:57:44 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-08-29 06:35:14 +1000
commit3ce109e12da7f4ee9392be7feef56e158f72914b (patch)
tree675eef7af4545f37df1a4bb45d54b0e9713101bd
parent3b80e994d5ada5d22bbe186aad0de28719b2d5b7 (diff)
downloadrust-3ce109e12da7f4ee9392be7feef56e158f72914b.tar.gz
rust-3ce109e12da7f4ee9392be7feef56e158f72914b.zip
Use `&'hir Ty` everywhere.
For consistency, and because it makes HIR measurement simpler and more
accurate.
-rw-r--r--clippy_lints/src/manual_bits.rs2
-rw-r--r--clippy_utils/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/manual_bits.rs b/clippy_lints/src/manual_bits.rs
index 60bbcde4f1d..940601a44fb 100644
--- a/clippy_lints/src/manual_bits.rs
+++ b/clippy_lints/src/manual_bits.rs
@@ -105,7 +105,7 @@ fn get_size_of_ty<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<
         if let Some(def_id) = cx.qpath_res(count_func_qpath, count_func.hir_id).opt_def_id();
         if cx.tcx.is_diagnostic_item(sym::mem_size_of, def_id);
         then {
-            cx.typeck_results().node_substs(count_func.hir_id).types().next().map(|resolved_ty| (real_ty, resolved_ty))
+            cx.typeck_results().node_substs(count_func.hir_id).types().next().map(|resolved_ty| (*real_ty, resolved_ty))
         } else {
             None
         }
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs
index dd1ceb6a4dc..42ce3b6bf0f 100644
--- a/clippy_utils/src/lib.rs
+++ b/clippy_utils/src/lib.rs
@@ -333,7 +333,7 @@ pub fn qpath_generic_tys<'tcx>(qpath: &QPath<'tcx>) -> impl Iterator<Item = &'tc
         .map_or(&[][..], |a| a.args)
         .iter()
         .filter_map(|a| match a {
-            hir::GenericArg::Type(ty) => Some(ty),
+            hir::GenericArg::Type(ty) => Some(*ty),
             _ => None,
         })
 }