]> git.lizzy.rs Git - rust.git/commit
Correctly detect reassignments to the interior of matched structs/tuples
authorBjörn Steinbrink <bsteinbr@gmail.com>
Mon, 13 Jul 2015 11:23:13 +0000 (13:23 +0200)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Mon, 13 Jul 2015 11:23:13 +0000 (13:23 +0200)
commit043d7b519871792860968680121bd98c02575c8f
tree7b61154c5fd691b0ce728d8a575f4d5663d86f1f
parent5f552a5da53e8164a13c337b6cbe39c3f20f35ff
Correctly detect reassignments to the interior of matched structs/tuples

If we match a whole struct or tuple, the "field" for the reassignment
checker will be "None" which means that mutating any field should count
as a reassignment.

Fixes #26996.
src/librustc_trans/trans/_match.rs
src/test/run-pass/issue-26996.rs [new file with mode: 0644]