rust-lang/rust — pull request #17175 by pcwalton (2014-09-11 19:01:55+00:00)
Title: 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]

r? @huonw