diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-09-11 11:59:05 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-09-11 12:00:56 -0700 |
| commit | a9b929dbb6b8e86ccedf96a207a6253c0af1d6c9 (patch) | |
| tree | 3cbdbb65cfff89c08732d95a32da59ddc60f682d /src/rustllvm/RustWrapper.cpp | |
| parent | c8b0d667c30e0918714ac178edaed883c6a8132a (diff) | |
| download | rust-a9b929dbb6b8e86ccedf96a207a6253c0af1d6c9.tar.gz rust-a9b929dbb6b8e86ccedf96a207a6253c0af1d6c9.zip | |
librustc: Make sure region bounds on closures outlive calls to them.
This can break code like:
fn call_rec(f: |uint| -> uint) -> uint {
(|x| f(x))(call_rec(f))
}
Change this code to use a temporary instead of violating the borrow
rules:
fn call_rec(f: |uint| -> uint) -> uint {
let tmp = call_rec(|x| f(x)); f(tmp)
}
Closes #17144.
[breaking-change]
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
