]> git.lizzy.rs Git - rust.git/commit
Update test to force error under NLL.
authorDavid Wood <david@davidtw.co>
Sun, 4 Nov 2018 17:36:30 +0000 (18:36 +0100)
committerDavid Wood <david@davidtw.co>
Sun, 4 Nov 2018 17:36:30 +0000 (18:36 +0100)
commitba09ed520864b5c64f56aa2311ee18fa72a3ceb6
tree4ab647f5dbda73f6ee811e8636e5a12ed5afae09
parent1854dde30a56a7fa135ec4f0be435d8de11ff1c1
Update test to force error under NLL.

In each of the three cases in this test, there is a mutable borrow
of some field of the union and then a shared borrow of some other field
immediately following.

Under NLL, the mutable borrow is killed straight away as it isn't
used later - therefore not causing a conflict with the shared borrow.
This commit adds a use of the first mutable borrow to force the intended
errors to appear under NLL.
src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr
src/test/ui/union/union-borrow-move-parent-sibling.rs
src/test/ui/union/union-borrow-move-parent-sibling.stderr