Skip to content

fix: enable multiple MemoryEffects on operand#1074

Merged
bitwalker merged 1 commit intonextfrom
mooori/fix-mem-op-rw
Apr 10, 2026
Merged

fix: enable multiple MemoryEffects on operand#1074
bitwalker merged 1 commit intonextfrom
mooori/fix-mem-op-rw

Conversation

@mooori
Copy link
Copy Markdown
Contributor

@mooori mooori commented Apr 10, 2026

Problem

So far there is at most 1 MemoryEffect on operand fields and hence the code gets expanded only once. Having multiple like MemoryEffect::Read, MemoryEffect::Write causes this to expand multiple times, which causes target (not Copy) to be moved multiple times.

Fix

Pass a fresh reference to each EffectInstance.

@mooori mooori marked this pull request as ready for review April 10, 2026 16:42
@mooori mooori requested review from bitwalker and greenhat April 10, 2026 16:42
@bitwalker bitwalker merged commit 3906a65 into next Apr 10, 2026
16 checks passed
@bitwalker bitwalker deleted the mooori/fix-mem-op-rw branch April 10, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants