forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#91469 - matthiaskrgr:rollup-xom3j55, r=matthi…
…askrgr Rollup of 12 pull requests Successful merges: - rust-lang#89954 (Fix legacy_const_generic doc arguments display) - rust-lang#91321 (Handle placeholder regions in NLL type outlive constraints) - rust-lang#91329 (Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives`) - rust-lang#91364 (Improve error message for incorrect field accesses through raw pointers) - rust-lang#91387 (Clarify and tidy up explanation of E0038) - rust-lang#91410 (Move `#![feature(const_precise_live_drops)]` checks earlier in the pipeline) - rust-lang#91435 (Improve diagnostic for missing half of binary operator in `if` condition) - rust-lang#91444 (disable tests in Miri that take too long) - rust-lang#91457 (Add additional test from rust issue number 91068) - rust-lang#91460 (Document how `last_os_error` should be used) - rust-lang#91464 (Document file path case sensitivity) - rust-lang#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.