MIR: asm statements don't participate in moveck #45695
Labels
A-borrow-checker
Area: The borrow checker
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
For example,
This errors out in this way (with MIR borrowck enabled):
Where only
x
is uninitialized with the AST borrowck, but both are uninitialized with MIR borrowckAlso, if there's a destructor for an input, it will run right after the asm statement is executed, which doesn't make any sense (the assertion there should fail, not succeed)
This is because move checking just ignores inline asm, while it should treat them like AST borrowck does (inputs move data out, outputs move data in)
The text was updated successfully, but these errors were encountered: