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

+1-1
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

+1-1
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

+7-7
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

+3-3
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

+1-1
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

+1-1
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

+2-2
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

+2-2
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

+1-1
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

+1-1
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 { .. }

src/librustc_mir/dataflow/move_paths/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
365365
| TerminatorKind::Resume
366366
| TerminatorKind::Abort
367367
| TerminatorKind::GeneratorDrop
368-
| TerminatorKind::FalseEdges { .. }
368+
| TerminatorKind::FalseEdge { .. }
369369
| TerminatorKind::FalseUnwind { .. }
370370
| TerminatorKind::Unreachable => {}
371371

src/librustc_mir/interpret/terminator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
129129

130130
// These should never occur for MIR we actually run.
131131
DropAndReplace { .. }
132-
| FalseEdges { .. }
132+
| FalseEdge { .. }
133133
| FalseUnwind { .. }
134134
| Yield { .. }
135135
| GeneratorDrop => span_bug!(

src/librustc_mir/monomorphize/collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> {
649649
| mir::TerminatorKind::Assert { .. } => {}
650650
mir::TerminatorKind::GeneratorDrop
651651
| mir::TerminatorKind::Yield { .. }
652-
| mir::TerminatorKind::FalseEdges { .. }
652+
| mir::TerminatorKind::FalseEdge { .. }
653653
| mir::TerminatorKind::FalseUnwind { .. } => bug!(),
654654
}
655655

src/librustc_mir/transform/check_consts/validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
609609
// instead.
610610
TerminatorKind::Abort
611611
| TerminatorKind::Assert { .. }
612-
| TerminatorKind::FalseEdges { .. }
612+
| TerminatorKind::FalseEdge { .. }
613613
| TerminatorKind::FalseUnwind { .. }
614614
| TerminatorKind::GeneratorDrop
615615
| TerminatorKind::Goto { .. }

src/librustc_mir/transform/check_unsafety.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
7676
| TerminatorKind::Abort
7777
| TerminatorKind::Return
7878
| TerminatorKind::Unreachable
79-
| TerminatorKind::FalseEdges { .. }
79+
| TerminatorKind::FalseEdge { .. }
8080
| TerminatorKind::FalseUnwind { .. } => {
8181
// safe (at least as emitted during MIR construction)
8282
}

src/librustc_mir/transform/const_prop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
10131013
| TerminatorKind::DropAndReplace { .. }
10141014
| TerminatorKind::Yield { .. }
10151015
| TerminatorKind::GeneratorDrop
1016-
| TerminatorKind::FalseEdges { .. }
1016+
| TerminatorKind::FalseEdge { .. }
10171017
| TerminatorKind::FalseUnwind { .. }
10181018
| TerminatorKind::InlineAsm { .. } => {}
10191019
// Every argument in our function calls can be const propagated.

src/librustc_mir/transform/generator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ fn can_unwind<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) -> bool {
971971
| TerminatorKind::Return
972972
| TerminatorKind::Unreachable
973973
| TerminatorKind::GeneratorDrop
974-
| TerminatorKind::FalseEdges { .. }
974+
| TerminatorKind::FalseEdge { .. }
975975
| TerminatorKind::FalseUnwind { .. }
976976
| TerminatorKind::InlineAsm { .. } => {}
977977

src/librustc_mir/transform/inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> {
791791
}
792792
TerminatorKind::Abort => {}
793793
TerminatorKind::Unreachable => {}
794-
TerminatorKind::FalseEdges { ref mut real_target, ref mut imaginary_target } => {
794+
TerminatorKind::FalseEdge { ref mut real_target, ref mut imaginary_target } => {
795795
*real_target = self.update_target(*real_target);
796796
*imaginary_target = self.update_target(*imaginary_target);
797797
}

src/librustc_mir/transform/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ fn check_terminator(
342342
) -> McfResult {
343343
let span = terminator.source_info.span;
344344
match &terminator.kind {
345-
TerminatorKind::FalseEdges { .. }
345+
TerminatorKind::FalseEdge { .. }
346346
| TerminatorKind::FalseUnwind { .. }
347347
| TerminatorKind::Goto { .. }
348348
| TerminatorKind::Return

src/librustc_mir/transform/remove_noop_landing_pads.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl RemoveNoopLandingPads {
6565
TerminatorKind::Goto { .. }
6666
| TerminatorKind::Resume
6767
| TerminatorKind::SwitchInt { .. }
68-
| TerminatorKind::FalseEdges { .. }
68+
| TerminatorKind::FalseEdge { .. }
6969
| TerminatorKind::FalseUnwind { .. } => {
7070
terminator.successors().all(|&succ| nop_landing_pads.contains(succ))
7171
}

src/librustc_mir/transform/simplify_branches.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<'tcx> MirPass<'tcx> for SimplifyBranches {
5353
} if (c.literal.try_eval_bool(tcx, param_env) == Some(true)) == expected => {
5454
TerminatorKind::Goto { target }
5555
}
56-
TerminatorKind::FalseEdges { real_target, .. } => {
56+
TerminatorKind::FalseEdge { real_target, .. } => {
5757
TerminatorKind::Goto { target: real_target }
5858
}
5959
TerminatorKind::FalseUnwind { real_target, .. } => {

src/librustc_mir/transform/validate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
159159
self.check_bb(location, *drop);
160160
}
161161
}
162-
TerminatorKind::FalseEdges { real_target, imaginary_target } => {
162+
TerminatorKind::FalseEdge { real_target, imaginary_target } => {
163163
self.check_bb(location, *real_target);
164164
self.check_bb(location, *imaginary_target);
165165
}

src/librustc_mir_build/build/matches/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
8585
self.cfg.terminate(
8686
from_block,
8787
source_info,
88-
TerminatorKind::FalseEdges { real_target, imaginary_target: target },
88+
TerminatorKind::FalseEdge { real_target, imaginary_target: target },
8989
);
9090
}
9191
_ => self.cfg.goto(from_block, source_info, real_target),

src/librustc_mir_build/lints.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl<'mir, 'tcx> TriColorVisitor<&'mir Body<'tcx>> for Search<'mir, 'tcx> {
128128
| TerminatorKind::Call { .. }
129129
| TerminatorKind::Drop { .. }
130130
| TerminatorKind::DropAndReplace { .. }
131-
| TerminatorKind::FalseEdges { .. }
131+
| TerminatorKind::FalseEdge { .. }
132132
| TerminatorKind::FalseUnwind { .. }
133133
| TerminatorKind::Goto { .. }
134134
| TerminatorKind::SwitchInt { .. } => ControlFlow::Continue,
@@ -153,7 +153,7 @@ impl<'mir, 'tcx> TriColorVisitor<&'mir Body<'tcx>> for Search<'mir, 'tcx> {
153153
TerminatorKind::Call { ref func, .. } => self.is_recursive_call(func),
154154

155155
TerminatorKind::FalseUnwind { unwind: Some(imaginary_target), .. }
156-
| TerminatorKind::FalseEdges { imaginary_target, .. } => imaginary_target == target,
156+
| TerminatorKind::FalseEdge { imaginary_target, .. } => imaginary_target == target,
157157

158158
_ => false,
159159
}

src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn match_tuple(_1: (u32, bool, std::option::Option<i32>, u32)) -> u32 {
8787
}
8888

8989
bb8: {
90-
falseEdges -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/exponential-or.rs:8:9: 8:79
90+
falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/exponential-or.rs:8:9: 8:79
9191
}
9292

9393
bb9: {

src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn main() -> () {
4141
}
4242

4343
bb4: {
44-
falseEdges -> [real: bb6, imaginary: bb5]; // scope 1 at $DIR/issue-38669.rs:7:9: 9:10
44+
falseEdge -> [real: bb6, imaginary: bb5]; // scope 1 at $DIR/issue-38669.rs:7:9: 9:10
4545
}
4646

4747
bb5: {

src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn main() -> () {
4343
}
4444

4545
bb5: {
46-
falseEdges -> [real: bb7, imaginary: bb6]; // scope 0 at $DIR/issue-49232.rs:9:17: 9:22
46+
falseEdge -> [real: bb7, imaginary: bb6]; // scope 0 at $DIR/issue-49232.rs:9:17: 9:22
4747
}
4848

4949
bb6: {

src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() -> () {
3131
}
3232

3333
bb2: {
34-
falseEdges -> [real: bb4, imaginary: bb3]; // scope 0 at $DIR/loop_test.rs:10:5: 12:6
34+
falseEdge -> [real: bb4, imaginary: bb3]; // scope 0 at $DIR/loop_test.rs:10:5: 12:6
3535
}
3636

3737
bb3: {

0 commit comments

Comments
 (0)