fix: return ealry when has tainted in mir-lint
This commit is contained in:
parent
1e746d7741
commit
967410c640
3 changed files with 34 additions and 0 deletions
|
@ -39,6 +39,10 @@ pub struct ConstProp;
|
|||
|
||||
impl<'tcx> MirLint<'tcx> for ConstProp {
|
||||
fn run_lint(&self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
|
||||
if body.tainted_by_errors.is_some() {
|
||||
return;
|
||||
}
|
||||
|
||||
// will be evaluated by miri and produce its errors there
|
||||
if body.source.promoted.is_some() {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue