1
Fork 0

Re-format code with new rustfmt

This commit is contained in:
Mark Rousskov 2023-11-13 08:24:55 -05:00
parent db3e2bacb6
commit 917f6540ed
70 changed files with 652 additions and 490 deletions

View file

@ -69,7 +69,9 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> {
}
TerminatorKind::Call { func: Operand::Constant(ref f), unwind, .. } => {
let fn_ty = self.instantiate_ty(f.const_.ty());
self.cost += if let ty::FnDef(def_id, _) = *fn_ty.kind() && tcx.is_intrinsic(def_id) {
self.cost += if let ty::FnDef(def_id, _) = *fn_ty.kind()
&& tcx.is_intrinsic(def_id)
{
// Don't give intrinsics the extra penalty for calls
INSTR_COST
} else {