Skip to content

Commit d931b03

Browse files
committed
rename FalseEdges -> FalseEdge
1 parent 450abe8 commit d931b03

38 files changed

+66
-66
lines changed

src/librustc_codegen_ssa/mir/analyze.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKi
357357
| TerminatorKind::Unreachable
358358
| TerminatorKind::SwitchInt { .. }
359359
| TerminatorKind::Yield { .. }
360-
| TerminatorKind::FalseEdges { .. }
360+
| TerminatorKind::FalseEdge { .. }
361361
| TerminatorKind::FalseUnwind { .. }
362362
| TerminatorKind::InlineAsm { .. } => { /* nothing to do */ }
363363
TerminatorKind::Call { cleanup: unwind, .. }

src/librustc_codegen_ssa/mir/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
10301030
mir::TerminatorKind::GeneratorDrop | mir::TerminatorKind::Yield { .. } => {
10311031
bug!("generator ops in codegen")
10321032
}
1033-
mir::TerminatorKind::FalseEdges { .. } | mir::TerminatorKind::FalseUnwind { .. } => {
1033+
mir::TerminatorKind::FalseEdge { .. } | mir::TerminatorKind::FalseUnwind { .. } => {
10341034
bug!("borrowck false edges in codegen")
10351035
}
10361036

src/librustc_middle/mir/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ pub enum TerminatorKind<'tcx> {
11601160

11611161
/// A block where control flow only ever takes one real path, but borrowck
11621162
/// needs to be more conservative.
1163-
FalseEdges {
1163+
FalseEdge {
11641164
/// The target normal control flow will take.
11651165
real_target: BasicBlock,
11661166
/// A block control flow could conceptually jump to, but won't in
@@ -1314,7 +1314,7 @@ impl<'tcx> TerminatorKind<'tcx> {
13141314
Some(t).into_iter().chain(slice::from_ref(u))
13151315
}
13161316
SwitchInt { ref targets, .. } => None.into_iter().chain(&targets[..]),
1317-
FalseEdges { ref real_target, ref imaginary_target } => {
1317+
FalseEdge { ref real_target, ref imaginary_target } => {
13181318
Some(real_target).into_iter().chain(slice::from_ref(imaginary_target))
13191319
}
13201320
}
@@ -1348,7 +1348,7 @@ impl<'tcx> TerminatorKind<'tcx> {
13481348
Some(t).into_iter().chain(slice::from_mut(u))
13491349
}
13501350
SwitchInt { ref mut targets, .. } => None.into_iter().chain(&mut targets[..]),
1351-
FalseEdges { ref mut real_target, ref mut imaginary_target } => {
1351+
FalseEdge { ref mut real_target, ref mut imaginary_target } => {
13521352
Some(real_target).into_iter().chain(slice::from_mut(imaginary_target))
13531353
}
13541354
}
@@ -1364,7 +1364,7 @@ impl<'tcx> TerminatorKind<'tcx> {
13641364
| TerminatorKind::GeneratorDrop
13651365
| TerminatorKind::Yield { .. }
13661366
| TerminatorKind::SwitchInt { .. }
1367-
| TerminatorKind::FalseEdges { .. }
1367+
| TerminatorKind::FalseEdge { .. }
13681368
| TerminatorKind::InlineAsm { .. } => None,
13691369
TerminatorKind::Call { cleanup: ref unwind, .. }
13701370
| TerminatorKind::Assert { cleanup: ref unwind, .. }
@@ -1384,7 +1384,7 @@ impl<'tcx> TerminatorKind<'tcx> {
13841384
| TerminatorKind::GeneratorDrop
13851385
| TerminatorKind::Yield { .. }
13861386
| TerminatorKind::SwitchInt { .. }
1387-
| TerminatorKind::FalseEdges { .. }
1387+
| TerminatorKind::FalseEdge { .. }
13881388
| TerminatorKind::InlineAsm { .. } => None,
13891389
TerminatorKind::Call { cleanup: ref mut unwind, .. }
13901390
| TerminatorKind::Assert { cleanup: ref mut unwind, .. }
@@ -1598,7 +1598,7 @@ impl<'tcx> TerminatorKind<'tcx> {
15981598
msg.fmt_assert_args(fmt)?;
15991599
write!(fmt, ")")
16001600
}
1601-
FalseEdges { .. } => write!(fmt, "falseEdges"),
1601+
FalseEdge { .. } => write!(fmt, "falseEdge"),
16021602
FalseUnwind { .. } => write!(fmt, "falseUnwind"),
16031603
InlineAsm { template, ref operands, options, .. } => {
16041604
write!(fmt, "asm!(\"{}\"", InlineAsmTemplatePiece::to_string(template))?;
@@ -1683,7 +1683,7 @@ impl<'tcx> TerminatorKind<'tcx> {
16831683
}
16841684
Assert { cleanup: None, .. } => vec!["".into()],
16851685
Assert { .. } => vec!["success".into(), "unwind".into()],
1686-
FalseEdges { .. } => vec!["real".into(), "imaginary".into()],
1686+
FalseEdge { .. } => vec!["real".into(), "imaginary".into()],
16871687
FalseUnwind { unwind: Some(_), .. } => vec!["real".into(), "cleanup".into()],
16881688
FalseUnwind { unwind: None, .. } => vec!["real".into()],
16891689
InlineAsm { destination: Some(_), .. } => vec!["".into()],

src/librustc_middle/mir/type_foldable.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
7474
Abort => Abort,
7575
Return => Return,
7676
Unreachable => Unreachable,
77-
FalseEdges { real_target, imaginary_target } => {
78-
FalseEdges { real_target, imaginary_target }
77+
FalseEdge { real_target, imaginary_target } => {
78+
FalseEdge { real_target, imaginary_target }
7979
}
8080
FalseUnwind { real_target, unwind } => FalseUnwind { real_target, unwind },
8181
InlineAsm { template, ref operands, options, line_spans, destination } => InlineAsm {
@@ -134,7 +134,7 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
134134
| Return
135135
| GeneratorDrop
136136
| Unreachable
137-
| FalseEdges { .. }
137+
| FalseEdge { .. }
138138
| FalseUnwind { .. } => false,
139139
}
140140
}

src/librustc_middle/mir/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ macro_rules! make_mir_visitor {
429429
TerminatorKind::Abort |
430430
TerminatorKind::GeneratorDrop |
431431
TerminatorKind::Unreachable |
432-
TerminatorKind::FalseEdges { .. } |
432+
TerminatorKind::FalseEdge { .. } |
433433
TerminatorKind::FalseUnwind { .. } => {
434434
}
435435

src/librustc_mir/borrow_check/invalidation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
215215
TerminatorKind::Goto { target: _ }
216216
| TerminatorKind::Abort
217217
| TerminatorKind::Unreachable
218-
| TerminatorKind::FalseEdges { real_target: _, imaginary_target: _ }
218+
| TerminatorKind::FalseEdge { real_target: _, imaginary_target: _ }
219219
| TerminatorKind::FalseUnwind { real_target: _, unwind: _ } => {
220220
// no data used, thus irrelevant to borrowck
221221
}

src/librustc_mir/borrow_check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ impl<'cx, 'tcx> dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtxt<'cx, 'tc
770770
| TerminatorKind::Resume
771771
| TerminatorKind::Return
772772
| TerminatorKind::GeneratorDrop
773-
| TerminatorKind::FalseEdges { real_target: _, imaginary_target: _ }
773+
| TerminatorKind::FalseEdge { real_target: _, imaginary_target: _ }
774774
| TerminatorKind::FalseUnwind { real_target: _, unwind: _ } => {
775775
// no data used, thus irrelevant to borrowck
776776
}
@@ -814,7 +814,7 @@ impl<'cx, 'tcx> dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtxt<'cx, 'tc
814814
| TerminatorKind::Call { .. }
815815
| TerminatorKind::Drop { .. }
816816
| TerminatorKind::DropAndReplace { .. }
817-
| TerminatorKind::FalseEdges { real_target: _, imaginary_target: _ }
817+
| TerminatorKind::FalseEdge { real_target: _, imaginary_target: _ }
818818
| TerminatorKind::FalseUnwind { real_target: _, unwind: _ }
819819
| TerminatorKind::Goto { .. }
820820
| TerminatorKind::SwitchInt { .. }

src/librustc_mir/borrow_check/type_check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
15471547
| TerminatorKind::GeneratorDrop
15481548
| TerminatorKind::Unreachable
15491549
| TerminatorKind::Drop { .. }
1550-
| TerminatorKind::FalseEdges { .. }
1550+
| TerminatorKind::FalseEdge { .. }
15511551
| TerminatorKind::FalseUnwind { .. }
15521552
| TerminatorKind::InlineAsm { .. } => {
15531553
// no checks needed for these
@@ -1843,7 +1843,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
18431843
self.assert_iscleanup(body, block_data, cleanup, true);
18441844
}
18451845
}
1846-
TerminatorKind::FalseEdges { real_target, imaginary_target } => {
1846+
TerminatorKind::FalseEdge { real_target, imaginary_target } => {
18471847
self.assert_iscleanup(body, block_data, real_target, is_cleanup);
18481848
self.assert_iscleanup(body, block_data, imaginary_target, is_cleanup);
18491849
}

src/librustc_mir/dataflow/framework/direction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ impl Direction for Forward {
453453
propagate(target, exit_state);
454454
}
455455

456-
FalseEdges { real_target, imaginary_target } => {
456+
FalseEdge { real_target, imaginary_target } => {
457457
propagate(real_target, exit_state);
458458
propagate(imaginary_target, exit_state);
459459
}

src/librustc_mir/dataflow/impls/borrowed_locals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ where
203203
TerminatorKind::Abort
204204
| TerminatorKind::Assert { .. }
205205
| TerminatorKind::Call { .. }
206-
| TerminatorKind::FalseEdges { .. }
206+
| TerminatorKind::FalseEdge { .. }
207207
| TerminatorKind::FalseUnwind { .. }
208208
| TerminatorKind::GeneratorDrop
209209
| TerminatorKind::Goto { .. }

0 commit comments

Comments
 (0)