Remove very useless as_substs usage from clippy
This commit is contained in:
parent
cddc7743a3
commit
e8c0c1eafe
1 changed files with 1 additions and 1 deletions
|
|
@ -975,7 +975,7 @@ pub fn approx_ty_size<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> u64 {
|
|||
}
|
||||
match (cx.layout_of(ty).map(|layout| layout.size.bytes()), ty.kind()) {
|
||||
(Ok(size), _) => size,
|
||||
(Err(_), ty::Tuple(list)) => list.as_substs().types().map(|t| approx_ty_size(cx, t)).sum(),
|
||||
(Err(_), ty::Tuple(list)) => list.iter().map(|t| approx_ty_size(cx, t)).sum(),
|
||||
(Err(_), ty::Array(t, n)) => {
|
||||
n.try_eval_target_usize(cx.tcx, cx.param_env).unwrap_or_default() * approx_ty_size(cx, *t)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue