-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The actual implementation remains in `rustc_mir_dataflow`, but this commit moves the `MirPass` impl to `rustc_mir_transform` and changes it to a `MirLint` (fixing a `FIXME` comment). (I originally tried moving the full implementation from `rustc_mir_dataflow` but I had some trait problems with `HasMoveData` and `RustcPeekAt` and `MaybeLiveLocals`. This commit was much smaller and simpler, but still will allow some follow-up cleanups.)
- Loading branch information
1 parent
bd53aa3
commit 5410900
Showing
3 changed files
with
50 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use rustc_middle::mir::Body; | ||
use rustc_middle::ty::TyCtxt; | ||
use rustc_mir_dataflow::rustc_peek::sanity_check; | ||
|
||
use crate::MirLint; | ||
|
||
pub(super) struct SanityCheck; | ||
|
||
impl<'tcx> MirLint<'tcx> for SanityCheck { | ||
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) { | ||
sanity_check(tcx, body); | ||
} | ||
} |