Fix const prop miscompilations of references with projections.#68002
Fix const prop miscompilations of references with projections.#68002jumbatm wants to merge 3 commits intorust-lang:masterfrom
Conversation
|
@bors r+ thanks! |
|
📌 Commit 63baf79837c61c9a4fc268bf037b594aef159281 has been approved by |
|
cc @wesleywiser |
|
☔ The latest upstream changes (presumably #67000) made this pull request unmergeable. Please resolve the merge conflicts. |
63baf79 to
7f83055
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
7f83055 to
ed3a601
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
☔ The latest upstream changes (presumably #68170) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Thanks! The linked issues have been fixed by outright stopping to const prop references, so i'm closing this PR |
|
Cool - no worries! |
Closes #67529.
Previously, we only returned early out of const prop of uninitialised Refs to Places if they had no projection. This meant that for uninitialised Places with a projection, when we forced an allocation, we wouldn't have a value to initialise the allocation with, leading us to replace the Ref with an allocation which we would never (and could never) initialise.
This PR fixes this by early returning out of const_prop if the Place's base local is uninitialised for Refs with projections, too.
r? @oli-obk