-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #91469 - matthiaskrgr:rollup-xom3j55, r=matthiaskrgr
Rollup of 12 pull requests Successful merges: - #89954 (Fix legacy_const_generic doc arguments display) - #91321 (Handle placeholder regions in NLL type outlive constraints) - #91329 (Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives`) - #91364 (Improve error message for incorrect field accesses through raw pointers) - #91387 (Clarify and tidy up explanation of E0038) - #91410 (Move `#![feature(const_precise_live_drops)]` checks earlier in the pipeline) - #91435 (Improve diagnostic for missing half of binary operator in `if` condition) - #91444 (disable tests in Miri that take too long) - #91457 (Add additional test from rust issue number 91068) - #91460 (Document how `last_os_error` should be used) - #91464 (Document file path case sensitivity) - #91466 (Improve the comments in `Symbol::interner`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
39 changed files
with
712 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use rustc_middle::mir::{Body, TerminatorKind}; | ||
use rustc_middle::ty::TyCtxt; | ||
|
||
use crate::MirPass; | ||
|
||
/// Removes `FalseEdge` and `FalseUnwind` terminators from the MIR. | ||
/// | ||
/// These are only needed for borrow checking, and can be removed afterwards. | ||
/// | ||
/// FIXME: This should probably have its own MIR phase. | ||
pub struct RemoveFalseEdges; | ||
|
||
impl<'tcx> MirPass<'tcx> for RemoveFalseEdges { | ||
fn run_pass(&self, _: TyCtxt<'tcx>, body: &mut Body<'tcx>) { | ||
for block in body.basic_blocks_mut() { | ||
let terminator = block.terminator_mut(); | ||
terminator.kind = match terminator.kind { | ||
TerminatorKind::FalseEdge { real_target, .. } => { | ||
TerminatorKind::Goto { target: real_target } | ||
} | ||
TerminatorKind::FalseUnwind { real_target, .. } => { | ||
TerminatorKind::Goto { target: real_target } | ||
} | ||
|
||
_ => continue, | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.