forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
check_live_drops
into a MirLint
.
It's a thin wrapper around `check_live_drops`, but it's enough to fix the FIXME comment.
- Loading branch information
1 parent
7023402
commit 8949b44
Showing
2 changed files
with
19 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use rustc_const_eval::check_consts; | ||
use rustc_middle::mir::*; | ||
use rustc_middle::ty::TyCtxt; | ||
|
||
use crate::MirLint; | ||
|
||
pub(super) struct CheckLiveDrops; | ||
|
||
impl<'tcx> MirLint<'tcx> for CheckLiveDrops { | ||
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) { | ||
check_consts::post_drop_elaboration::check_live_drops(tcx, body); | ||
} | ||
} |