about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-29 08:38:39 +0000
committerbors <bors@rust-lang.org>2021-10-29 08:38:39 +0000
commit37f70a0e1e04086aee7ae57fbefd6d4071953506 (patch)
tree8fb2c5c02afc1fc099b2e7ebc5f2500ebe41f294 /compiler/rustc_mir_transform/src/coverage/mod.rs
parent88a5a984fe95e0411dce4e8364f9630cadd3782c (diff)
parent93f85f5a9d97fc49826d0063c9db0a71602d3283 (diff)
downloadrust-37f70a0e1e04086aee7ae57fbefd6d4071953506.tar.gz
rust-37f70a0e1e04086aee7ae57fbefd6d4071953506.zip
Auto merge of #90214 - tmiasko:indirect-mutation-qualif, r=ecstatic-morse,oli-obk
Consider indirect mutation during const qualification dataflow

Previously a local would be qualified if either one of two separate data
flow computations indicated so. First determined if a local could
contain the qualif, but ignored any forms of indirect mutation. Second
determined if a local could be mutably borrowed (and so indirectly
mutated), but which in turn ignored the qualif.

The end result was incorrect because the effect of indirect mutation was
effectivelly ignored in the all but the final stage of computation.

In the new implementation the indirect mutation is directly incorporated
into the qualif data flow. The local variable becomes immediately
qualified once it is mutably borrowed and borrowed place type can
contain the qualif.

In general we will now reject additional programs, program that were
prevously unintentionally accepted.

There are also some cases which are now accepted but were previously
rejected, because previous implementation didn't consider whether
borrowed place could have the qualif under the consideration.

Fixes #90124.

r? `@ecstatic-morse`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions