Rollup merge of #101142 - nnethercote:improve-hir-stats, r=davidtwco

Improve HIR stats

#100398 improve the AST stats collection done by `-Zhir-stats`. This PR does the same for HIR stats collection.

r? `@davidtwco`
This commit is contained in:
Dylan DPC 2022-09-05 14:15:51 +05:30 committed by GitHub
commit 9ae329232b
4 changed files with 6 additions and 6 deletions

View file

@ -337,7 +337,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,
})
}
@ -1812,7 +1812,7 @@ pub fn is_expr_identity_function(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool
}
};
let mut expr = &func.value;
let mut expr = func.value;
loop {
match expr.kind {
#[rustfmt::skip]