From: bors Date: Sat, 13 Sep 2014 08:06:00 +0000 (+0000) Subject: auto merge of #17175 : pcwalton/rust/region-bounds-on-closures, r=huonw X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=90304ed2669a9554a5aa5c58194e71fa373abe13;p=rust.git auto merge of #17175 : pcwalton/rust/region-bounds-on-closures, r=huonw 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] r? @huonw --- 90304ed2669a9554a5aa5c58194e71fa373abe13