Enable ConstPropLint
for promoteds
This fixes the issue wherein the lint didn't fire for promoteds in the case of SHL/SHR operators in non-optimized builds and all arithmetic operators in optimized builds
This commit is contained in:
parent
405b22f1a3
commit
5010ca001c
29 changed files with 6967 additions and 738 deletions
|
@ -32,11 +32,6 @@ impl<'tcx> MirLint<'tcx> for ConstPropLint {
|
|||
return;
|
||||
}
|
||||
|
||||
// will be evaluated by miri and produce its errors there
|
||||
if body.source.promoted.is_some() {
|
||||
return;
|
||||
}
|
||||
|
||||
let def_id = body.source.def_id().expect_local();
|
||||
let def_kind = tcx.def_kind(def_id);
|
||||
let is_fn_like = def_kind.is_fn_like();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue