Rollup merge of #115643 - bvanjoi:fix-115203, r=RalfJung,oli-obk
fix: return early when has tainted in mir-lint Fixes #115203 `a[..]` is of indeterminate size, it had been reported error during borrow check, therefore we skip the mir lint process.
This commit is contained in:
commit
60327bb8b0
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