Skip to content

Commit 4b64211

Browse files
committed
Add an Abort terminator to MIR and lower all abort intrinsic calls to it
1 parent 9f08a68 commit 4b64211

File tree

44 files changed

+94
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+94
-35
lines changed

compiler/rustc_borrowck/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ impl<'cx, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx, R> for MirBorro
755755

756756
TerminatorKind::Goto { target: _ }
757757
| TerminatorKind::UnwindTerminate(_)
758+
| TerminatorKind::Abort
758759
| TerminatorKind::Unreachable
759760
| TerminatorKind::UnwindResume
760761
| TerminatorKind::Return
@@ -810,6 +811,7 @@ impl<'cx, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx, R> for MirBorro
810811
| TerminatorKind::Goto { .. }
811812
| TerminatorKind::SwitchInt { .. }
812813
| TerminatorKind::Unreachable
814+
| TerminatorKind::Abort
813815
| TerminatorKind::InlineAsm { .. } => {}
814816
}
815817
}

compiler/rustc_borrowck/src/polonius/loan_invalidations.rs

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for LoanInvalidationsGenerator<'cx, 'tcx> {
190190
TerminatorKind::Goto { target: _ }
191191
| TerminatorKind::UnwindTerminate(_)
192192
| TerminatorKind::Unreachable
193+
| TerminatorKind::Abort
193194
| TerminatorKind::FalseEdge { real_target: _, imaginary_target: _ }
194195
| TerminatorKind::FalseUnwind { real_target: _, unwind: _ } => {
195196
// no data used, thus irrelevant to borrowck

compiler/rustc_borrowck/src/type_check/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
13961396
| TerminatorKind::UnwindTerminate(_)
13971397
| TerminatorKind::Return
13981398
| TerminatorKind::CoroutineDrop
1399+
| TerminatorKind::Abort
13991400
| TerminatorKind::Unreachable
14001401
| TerminatorKind::Drop { .. }
14011402
| TerminatorKind::FalseEdge { .. }
@@ -1750,7 +1751,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
17501751
self.assert_iscleanup(body, block_data, drop, is_cleanup);
17511752
}
17521753
}
1753-
TerminatorKind::Unreachable => {}
1754+
TerminatorKind::Abort | TerminatorKind::Unreachable => {}
17541755
TerminatorKind::Drop { target, unwind, .. }
17551756
| TerminatorKind::Assert { target, unwind, .. } => {
17561757
self.assert_iscleanup(body, block_data, target, is_cleanup);

compiler/rustc_codegen_cranelift/src/base.rs

+3
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,9 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
487487
TerminatorKind::Unreachable => {
488488
fx.bcx.ins().trap(TrapCode::UnreachableCodeReached);
489489
}
490+
TerminatorKind::Abort => {
491+
fx.bcx.ins().trap(TrapCode::User(0));
492+
}
490493
TerminatorKind::Yield { .. }
491494
| TerminatorKind::FalseEdge { .. }
492495
| TerminatorKind::FalseUnwind { .. }

compiler/rustc_codegen_cranelift/src/constant.rs

+1
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
532532
| TerminatorKind::UnwindResume
533533
| TerminatorKind::UnwindTerminate(_)
534534
| TerminatorKind::Return
535+
| TerminatorKind::Abort
535536
| TerminatorKind::Unreachable
536537
| TerminatorKind::Drop { .. }
537538
| TerminatorKind::Assert { .. } => {}

compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

-4
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,6 @@ fn codegen_regular_intrinsic_call<'tcx>(
439439
let usize_layout = fx.layout_of(fx.tcx.types.usize);
440440

441441
match intrinsic {
442-
sym::abort => {
443-
fx.bcx.ins().trap(TrapCode::User(0));
444-
return Ok(());
445-
}
446442
sym::likely | sym::unlikely => {
447443
intrinsic_args!(fx, args => (a); intrinsic);
448444

compiler/rustc_codegen_gcc/src/intrinsic/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ fn get_simple_intrinsic<'gcc, 'tcx>(
8888
sym::roundf64 => "round",
8989
sym::roundevenf32 => "roundevenf",
9090
sym::roundevenf64 => "roundeven",
91-
sym::abort => "abort",
9291
_ => return None,
9392
};
9493
Some(cx.context.get_builtin_function(&gcc_name))

compiler/rustc_codegen_ssa/src/mir/analyze.rs

+1
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKi
280280
| TerminatorKind::UnwindTerminate(_)
281281
| TerminatorKind::Return
282282
| TerminatorKind::CoroutineDrop
283+
| TerminatorKind::Abort
283284
| TerminatorKind::Unreachable
284285
| TerminatorKind::SwitchInt { .. }
285286
| TerminatorKind::Yield { .. }

compiler/rustc_codegen_ssa/src/mir/block.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
12951295
MergingSucc::False
12961296
}
12971297

1298+
mir::TerminatorKind::Abort => {
1299+
bx.abort();
1300+
// `abort` does not terminate the block, so we still need to generate
1301+
// an `unreachable` terminator after it.
1302+
bx.unreachable();
1303+
MergingSucc::False
1304+
}
1305+
12981306
mir::TerminatorKind::Drop { place, target, unwind, replace: _ } => {
12991307
self.codegen_drop_terminator(helper, bx, place, target, unwind, mergeable_succ())
13001308
}

compiler/rustc_codegen_ssa/src/mir/intrinsic.rs

-5
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
7979
let result = PlaceRef::new_sized(llresult, fn_abi.ret.layout);
8080

8181
let llval = match name {
82-
sym::abort => {
83-
bx.abort();
84-
return Ok(());
85-
}
86-
8782
sym::va_start => bx.va_start(args[0].immediate()),
8883
sym::va_end => bx.va_end(args[0].immediate()),
8984
sym::size_of_val => {

compiler/rustc_const_eval/src/interpret/terminator.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::borrow::Cow;
33
use either::Either;
44

55
use rustc_middle::{
6-
mir,
6+
mir::{self, interpret},
77
ty::{
88
self,
99
layout::{FnAbiOf, IntegerExt, LayoutOf, TyAndLayout},
@@ -212,6 +212,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
212212
return Ok(());
213213
}
214214

215+
Abort => throw_machine_stop!(interpret::Abort),
216+
215217
// It is UB to ever encounter this.
216218
Unreachable => throw_ub!(Unreachable),
217219

compiler/rustc_const_eval/src/transform/check_consts/check.rs

+1
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
955955
| TerminatorKind::Goto { .. }
956956
| TerminatorKind::UnwindResume
957957
| TerminatorKind::Return
958+
| TerminatorKind::Abort
958959
| TerminatorKind::SwitchInt { .. }
959960
| TerminatorKind::Unreachable => {}
960961
}

compiler/rustc_const_eval/src/transform/check_consts/post_drop_elaboration.rs

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ impl<'tcx> Visitor<'tcx> for CheckLiveDrops<'_, 'tcx> {
117117
| mir::TerminatorKind::Return
118118
| mir::TerminatorKind::SwitchInt { .. }
119119
| mir::TerminatorKind::Unreachable
120+
| mir::TerminatorKind::Abort
120121
| mir::TerminatorKind::Yield { .. } => {}
121122
}
122123
}

compiler/rustc_const_eval/src/transform/validate.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
509509
self.fail(location, "Cannot `Return` from cleanup basic block")
510510
}
511511
}
512-
TerminatorKind::Unreachable => {}
512+
TerminatorKind::Abort | TerminatorKind::Unreachable => {}
513513
}
514514

515515
self.super_terminator(terminator, location);
@@ -1342,6 +1342,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
13421342
| TerminatorKind::UnwindResume
13431343
| TerminatorKind::UnwindTerminate(_)
13441344
| TerminatorKind::Return
1345+
| TerminatorKind::Abort
13451346
| TerminatorKind::Unreachable => {}
13461347
}
13471348

compiler/rustc_middle/src/mir/interpret/error.rs

+11
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,17 @@ impl dyn MachineStopType {
501501
}
502502
}
503503

504+
#[derive(Debug)]
505+
pub struct Abort;
506+
507+
impl MachineStopType for Abort {
508+
fn diagnostic_message(&self) -> DiagMessage {
509+
"the program aborted execution".into()
510+
}
511+
512+
fn add_args(self: Box<Self>, _adder: &mut dyn FnMut(DiagArgName, DiagArgValue)) {}
513+
}
514+
504515
#[derive(Debug)]
505516
pub enum InterpError<'tcx> {
506517
/// The program caused undefined behavior.

compiler/rustc_middle/src/mir/interpret/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ use crate::ty::GenericArgKind;
142142
use crate::ty::{self, Instance, Ty, TyCtxt};
143143

144144
pub use self::error::{
145-
BadBytesAccess, CheckAlignMsg, CheckInAllocMsg, ErrorHandled, EvalStaticInitializerRawResult,
146-
EvalToAllocationRawResult, EvalToConstValueResult, EvalToValTreeResult, ExpectedKind,
147-
InterpError, InterpErrorInfo, InterpResult, InvalidMetaKind, InvalidProgramInfo,
148-
MachineStopType, Misalignment, PointerKind, ReportedErrorInfo, ResourceExhaustionInfo,
149-
ScalarSizeMismatch, UndefinedBehaviorInfo, UnsupportedOpInfo, ValidationErrorInfo,
150-
ValidationErrorKind,
145+
Abort, BadBytesAccess, CheckAlignMsg, CheckInAllocMsg, ErrorHandled,
146+
EvalStaticInitializerRawResult, EvalToAllocationRawResult, EvalToConstValueResult,
147+
EvalToValTreeResult, ExpectedKind, InterpError, InterpErrorInfo, InterpResult, InvalidMetaKind,
148+
InvalidProgramInfo, MachineStopType, Misalignment, PointerKind, ReportedErrorInfo,
149+
ResourceExhaustionInfo, ScalarSizeMismatch, UndefinedBehaviorInfo, UnsupportedOpInfo,
150+
ValidationErrorInfo, ValidationErrorKind,
151151
};
152152

153153
pub use self::value::Scalar;

compiler/rustc_middle/src/mir/pretty.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ impl<'tcx> TerminatorKind<'tcx> {
768768
}
769769
Yield { value, resume_arg, .. } => write!(fmt, "{resume_arg:?} = yield({value:?})"),
770770
Unreachable => write!(fmt, "unreachable"),
771+
Abort => write!(fmt, "abort"),
771772
Drop { place, .. } => write!(fmt, "drop({place:?})"),
772773
Call { func, args, destination, .. } => {
773774
write!(fmt, "{destination:?} = ")?;
@@ -847,7 +848,9 @@ impl<'tcx> TerminatorKind<'tcx> {
847848
pub fn fmt_successor_labels(&self) -> Vec<Cow<'static, str>> {
848849
use self::TerminatorKind::*;
849850
match *self {
850-
Return | UnwindResume | UnwindTerminate(_) | Unreachable | CoroutineDrop => vec![],
851+
Return | UnwindResume | UnwindTerminate(_) | Unreachable | CoroutineDrop | Abort => {
852+
vec![]
853+
}
851854
Goto { .. } => vec!["".into()],
852855
SwitchInt { ref targets, .. } => targets
853856
.values

compiler/rustc_middle/src/mir/syntax.rs

+6
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,11 @@ pub enum TerminatorKind<'tcx> {
637637
/// Executing this terminator is UB.
638638
Unreachable,
639639

640+
/// Equivalent to invoking the `abort` intrinsic
641+
///
642+
/// Halts execution without unwinding.
643+
Abort,
644+
640645
/// The behavior of this statement differs significantly before and after drop elaboration.
641646
///
642647
/// After drop elaboration: `Drop` terminators are a complete nop for types that have no drop
@@ -815,6 +820,7 @@ impl TerminatorKind<'_> {
815820
TerminatorKind::UnwindTerminate(_) => "UnwindTerminate",
816821
TerminatorKind::Return => "Return",
817822
TerminatorKind::Unreachable => "Unreachable",
823+
TerminatorKind::Abort => "Abort",
818824
TerminatorKind::Drop { .. } => "Drop",
819825
TerminatorKind::Call { .. } => "Call",
820826
TerminatorKind::Assert { .. } => "Assert",

compiler/rustc_middle/src/mir/terminator.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ impl<'tcx> TerminatorKind<'tcx> {
402402
| CoroutineDrop
403403
| Return
404404
| Unreachable
405+
| Abort
405406
| Call { target: None, unwind: _, .. } => (&[]).into_iter().copied().chain(None),
406407
InlineAsm { ref targets, unwind: UnwindAction::Cleanup(u), .. } => {
407408
targets.iter().copied().chain(Some(u))
@@ -439,6 +440,7 @@ impl<'tcx> TerminatorKind<'tcx> {
439440
| CoroutineDrop
440441
| Return
441442
| Unreachable
443+
| Abort
442444
| Call { target: None, unwind: _, .. } => (&mut []).into_iter().chain(None),
443445
InlineAsm { ref mut targets, unwind: UnwindAction::Cleanup(ref mut u), .. } => {
444446
targets.iter_mut().chain(Some(u))
@@ -459,6 +461,7 @@ impl<'tcx> TerminatorKind<'tcx> {
459461
| TerminatorKind::UnwindTerminate(_)
460462
| TerminatorKind::Return
461463
| TerminatorKind::Unreachable
464+
| TerminatorKind::Abort
462465
| TerminatorKind::CoroutineDrop
463466
| TerminatorKind::Yield { .. }
464467
| TerminatorKind::SwitchInt { .. }
@@ -479,6 +482,7 @@ impl<'tcx> TerminatorKind<'tcx> {
479482
| TerminatorKind::UnwindTerminate(_)
480483
| TerminatorKind::Return
481484
| TerminatorKind::Unreachable
485+
| TerminatorKind::Abort
482486
| TerminatorKind::CoroutineDrop
483487
| TerminatorKind::Yield { .. }
484488
| TerminatorKind::SwitchInt { .. }
@@ -563,7 +567,7 @@ impl<'tcx> TerminatorKind<'tcx> {
563567
pub fn edges(&self) -> TerminatorEdges<'_, 'tcx> {
564568
use TerminatorKind::*;
565569
match *self {
566-
Return | UnwindResume | UnwindTerminate(_) | CoroutineDrop | Unreachable => {
570+
Return | UnwindResume | UnwindTerminate(_) | CoroutineDrop | Unreachable | Abort => {
567571
TerminatorEdges::None
568572
}
569573

compiler/rustc_middle/src/mir/visit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ macro_rules! make_mir_visitor {
475475
TerminatorKind::UnwindTerminate(_) |
476476
TerminatorKind::CoroutineDrop |
477477
TerminatorKind::Unreachable |
478+
TerminatorKind::Abort |
478479
TerminatorKind::FalseEdge { .. } |
479480
TerminatorKind::FalseUnwind { .. } => {}
480481

compiler/rustc_mir_build/src/build/scope.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,7 @@ impl<'tcx> DropTreeBuilder<'tcx> for Unwind {
15321532
| TerminatorKind::UnwindTerminate(_)
15331533
| TerminatorKind::Return
15341534
| TerminatorKind::Unreachable
1535+
| TerminatorKind::Abort
15351536
| TerminatorKind::Yield { .. }
15361537
| TerminatorKind::CoroutineDrop
15371538
| TerminatorKind::FalseEdge { .. } => {

compiler/rustc_mir_build/src/lints.rs

+1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ impl<'mir, 'tcx, C: TerminatorClassifier<'tcx>> TriColorVisitor<BasicBlocks<'tcx
197197
| TerminatorKind::UnwindResume
198198
| TerminatorKind::Return
199199
| TerminatorKind::Unreachable
200+
| TerminatorKind::Abort
200201
| TerminatorKind::Yield { .. } => ControlFlow::Break(NonRecursive),
201202

202203
// A InlineAsm without targets (diverging and contains no labels)

compiler/rustc_mir_dataflow/src/impls/borrowed_locals.rs

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ where
148148
| TerminatorKind::Return
149149
| TerminatorKind::SwitchInt { .. }
150150
| TerminatorKind::Unreachable
151+
| TerminatorKind::Abort
151152
| TerminatorKind::Yield { .. } => {}
152153
}
153154
}

compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs

+2
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ impl<'tcx> crate::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'_, 'tcx> {
288288
| TerminatorKind::Goto { .. }
289289
| TerminatorKind::UnwindResume
290290
| TerminatorKind::Return
291+
| TerminatorKind::Abort
291292
| TerminatorKind::SwitchInt { .. }
292293
| TerminatorKind::Unreachable => {}
293294
}
@@ -325,6 +326,7 @@ impl<'tcx> crate::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'_, 'tcx> {
325326
| TerminatorKind::Goto { .. }
326327
| TerminatorKind::UnwindResume
327328
| TerminatorKind::Return
329+
| TerminatorKind::Abort
328330
| TerminatorKind::SwitchInt { .. }
329331
| TerminatorKind::Unreachable => {}
330332
}

compiler/rustc_mir_dataflow/src/move_paths/builder.rs

+1
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> {
453453
| TerminatorKind::UnwindTerminate(_)
454454
| TerminatorKind::CoroutineDrop
455455
| TerminatorKind::Unreachable
456+
| TerminatorKind::Abort
456457
| TerminatorKind::Drop { .. } => {}
457458

458459
TerminatorKind::Assert { ref cond, .. } => {

compiler/rustc_mir_dataflow/src/value_analysis.rs

+1
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ pub trait ValueAnalysis<'tcx> {
273273
| TerminatorKind::UnwindTerminate(_)
274274
| TerminatorKind::Return
275275
| TerminatorKind::Unreachable
276+
| TerminatorKind::Abort
276277
| TerminatorKind::Assert { .. }
277278
| TerminatorKind::CoroutineDrop
278279
| TerminatorKind::FalseEdge { .. }

compiler/rustc_mir_transform/src/check_unsafety.rs

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
6060
| TerminatorKind::UnwindResume
6161
| TerminatorKind::UnwindTerminate(_)
6262
| TerminatorKind::Return
63+
| TerminatorKind::Abort
6364
| TerminatorKind::Unreachable
6465
| TerminatorKind::FalseEdge { .. }
6566
| TerminatorKind::FalseUnwind { .. } => {

compiler/rustc_mir_transform/src/coroutine.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,7 @@ fn can_unwind<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) -> bool {
13561356
| TerminatorKind::SwitchInt { .. }
13571357
| TerminatorKind::UnwindTerminate(_)
13581358
| TerminatorKind::Return
1359+
| TerminatorKind::Abort
13591360
| TerminatorKind::Unreachable
13601361
| TerminatorKind::CoroutineDrop
13611362
| TerminatorKind::FalseEdge { .. }
@@ -1887,6 +1888,7 @@ impl<'tcx> Visitor<'tcx> for EnsureCoroutineFieldAssignmentsNeverAlias<'_> {
18871888
| TerminatorKind::UnwindResume
18881889
| TerminatorKind::UnwindTerminate(_)
18891890
| TerminatorKind::Return
1891+
| TerminatorKind::Abort
18901892
| TerminatorKind::Unreachable
18911893
| TerminatorKind::Drop { .. }
18921894
| TerminatorKind::Assert { .. }

compiler/rustc_mir_transform/src/coverage/graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ fn bcb_filtered_successors<'a, 'tcx>(terminator: &'a Terminator<'tcx>) -> Covera
367367
}
368368

369369
// These terminators have no coverage-relevant successors.
370-
CoroutineDrop | Return | Unreachable | UnwindResume | UnwindTerminate(_) => {
370+
CoroutineDrop | Return | Unreachable | Abort | UnwindResume | UnwindTerminate(_) => {
371371
CoverageSuccessors::NotChainable(&[])
372372
}
373373
}

compiler/rustc_mir_transform/src/coverage/spans/from_mir.rs

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ fn filtered_terminator_span(terminator: &Terminator<'_>) -> Option<Span> {
242242
// but for coverage, the code region executed, up to *and* through the SwitchInt,
243243
// actually stops before the if's block.)
244244
TerminatorKind::Unreachable // Unreachable blocks are not connected to the MIR CFG
245+
| TerminatorKind::Abort
245246
| TerminatorKind::Assert { .. }
246247
| TerminatorKind::Drop { .. }
247248
| TerminatorKind::SwitchInt { .. }

compiler/rustc_mir_transform/src/dest_prop.rs

+1
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,7 @@ impl WriteInfo {
657657
| TerminatorKind::UnwindResume
658658
| TerminatorKind::UnwindTerminate(_)
659659
| TerminatorKind::Return
660+
| TerminatorKind::Abort
660661
| TerminatorKind::Unreachable { .. } => (),
661662
TerminatorKind::Drop { .. } => {
662663
// `Drop`s create a `&mut` and so are not considered

0 commit comments

Comments
 (0)