Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3ce109e

Browse files
committed
Use &'hir Ty everywhere.
For consistency, and because it makes HIR measurement simpler and more accurate.
1 parent 3b80e99 commit 3ce109e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/manual_bits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ fn get_size_of_ty<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<
105105
if let Some(def_id) = cx.qpath_res(count_func_qpath, count_func.hir_id).opt_def_id();
106106
if cx.tcx.is_diagnostic_item(sym::mem_size_of, def_id);
107107
then {
108-
cx.typeck_results().node_substs(count_func.hir_id).types().next().map(|resolved_ty| (real_ty, resolved_ty))
108+
cx.typeck_results().node_substs(count_func.hir_id).types().next().map(|resolved_ty| (*real_ty, resolved_ty))
109109
} else {
110110
None
111111
}

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ pub fn qpath_generic_tys<'tcx>(qpath: &QPath<'tcx>) -> impl Iterator<Item = &'tc
333333
.map_or(&[][..], |a| a.args)
334334
.iter()
335335
.filter_map(|a| match a {
336-
hir::GenericArg::Type(ty) => Some(ty),
336+
hir::GenericArg::Type(ty) => Some(*ty),
337337
_ => None,
338338
})
339339
}

0 commit comments

Comments
 (0)