rustc_monomorphize: Reduce check_move_size() indentation
This commit is contained in:
parent
af86069ab1
commit
1f56ff8f26
1 changed files with 26 additions and 27 deletions
|
@ -609,9 +609,10 @@ impl<'a, 'tcx> MirUsedCollector<'a, 'tcx> {
|
|||
let limit = Size::from_bytes(limit);
|
||||
let ty = operand.ty(self.body, self.tcx);
|
||||
let ty = self.monomorphize(ty);
|
||||
let layout = self.tcx.layout_of(ty::ParamEnv::reveal_all().and(ty));
|
||||
if let Ok(layout) = layout {
|
||||
if layout.size > limit {
|
||||
let Ok(layout) = self.tcx.layout_of(ty::ParamEnv::reveal_all().and(ty)) else { return };
|
||||
if layout.size <= limit {
|
||||
return;
|
||||
}
|
||||
debug!(?layout);
|
||||
let source_info = self.body.source_info(location);
|
||||
debug!(?source_info);
|
||||
|
@ -634,9 +635,7 @@ impl<'a, 'tcx> MirUsedCollector<'a, 'tcx> {
|
|||
size: layout.size.bytes(),
|
||||
limit: limit.bytes(),
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue