Skip to content

Commit 4910ed2

Browse files
committed
Mir: fixup nits in previous commit (f536143)
As suggested by arielb1. Closes #18510 Signed-off-by: David Henningsson <[email protected]>
1 parent f536143 commit 4910ed2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/librustc_mir/build/mod.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ macro_rules! unpack {
354354
};
355355
}
356356

357-
fn needs_abort_block<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
358-
fn_id: ast::NodeId,
359-
abi: Abi)
360-
-> bool {
357+
fn should_abort_on_panic<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
358+
fn_id: ast::NodeId,
359+
abi: Abi)
360+
-> bool {
361361

362362
// Not callable from C, so we can safely unwind through these
363363
if abi == Abi::Rust || abi == Abi::RustCall { return false; }
@@ -405,8 +405,7 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
405405
let source_info = builder.source_info(span);
406406
let call_site_s = (call_site_scope, source_info);
407407
unpack!(block = builder.in_scope(call_site_s, LintLevel::Inherited, block, |builder| {
408-
409-
if needs_abort_block(tcx, fn_id, abi) {
408+
if should_abort_on_panic(tcx, fn_id, abi) {
410409
builder.schedule_abort();
411410
}
412411

0 commit comments

Comments
 (0)