diff options
| author | David Henningsson <diwic@ubuntu.com> | 2017-12-21 19:32:26 +0100 |
|---|---|---|
| committer | David Henningsson <diwic@ubuntu.com> | 2017-12-21 19:36:53 +0100 |
| commit | 4910ed2b1e12cfb9518ea1e1be0ec144fa0d95a6 (patch) | |
| tree | 49bc09dbae7f925a38e88ac38a1e34d4b92e5918 /src | |
| parent | f536143ab68c9db352e78269b3ec72b358b18548 (diff) | |
Mir: fixup nits in previous commit (f536143)
As suggested by arielb1. Closes rust-lang/rust#18510 Signed-off-by: David Henningsson <diwic@ubuntu.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/build/mod.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/librustc_mir/build/mod.rs b/src/librustc_mir/build/mod.rs index 4b8ec062a78..2889a05bec5 100644 --- a/src/librustc_mir/build/mod.rs +++ b/src/librustc_mir/build/mod.rs @@ -354,10 +354,10 @@ macro_rules! unpack { }; } -fn needs_abort_block<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>, - fn_id: ast::NodeId, - abi: Abi) - -> bool { +fn should_abort_on_panic<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>, + fn_id: ast::NodeId, + abi: Abi) + -> bool { // Not callable from C, so we can safely unwind through these 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>, let source_info = builder.source_info(span); let call_site_s = (call_site_scope, source_info); unpack!(block = builder.in_scope(call_site_s, LintLevel::Inherited, block, |builder| { - - if needs_abort_block(tcx, fn_id, abi) { + if should_abort_on_panic(tcx, fn_id, abi) { builder.schedule_abort(); } |
