about summary refs log tree commit diff
path: root/src/test/codegen/align-struct.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-12-15 05:40:12 +0000
committerbors <bors@rust-lang.org>2017-12-15 05:40:12 +0000
commit84feab34e455722061bb55260eafd1eb02a538fa (patch)
tree0a791087fcd4e939afeef853e32693170bf3e0e3 /src/test/codegen/align-struct.rs
parent933103190950c97b966e789e9206bff2f7bd6118 (diff)
parent159037e05383f2349a709aa1c1681f11f89c552a (diff)
downloadrust-84feab34e455722061bb55260eafd1eb02a538fa.tar.gz
rust-84feab34e455722061bb55260eafd1eb02a538fa.zip
Auto merge of #46537 - pnkfelix:two-phase-borrows, r=arielb1
[MIR-borrowck] Two phase borrows

This adds limited support for two-phase borrows as described in
  http://smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/

The support is off by default; you opt into it via the flag `-Z two-phase-borrows`

I have written "*limited* support" above because there are simple variants of the simple `v.push(v.len())` example that one would think should work but currently do not, such as the one documented in the test compile-fail/borrowck/two-phase-reservation-sharing-interference-2.rs

(To be clear, that test is not describing something that is unsound. It is just providing an explicit example of a limitation in the implementation given in this PR. I have ideas on how to fix, but I want to land the work that is in this PR first, so that I can stop repeatedly rebasing this branch.)
Diffstat (limited to 'src/test/codegen/align-struct.rs')
0 files changed, 0 insertions, 0 deletions