auto merge of #6302 : nikomatsakis/rust/issue-6141-leaking-owned-fn, r=brson

When autoborrowing a fn in trans, adjust the type of the datum to be `&fn`.

Fixes #6141.

r? @brson
This commit is contained in:
bors 2013-05-07 17:30:38 -07:00
commit d35eb6e1ee
6 changed files with 71 additions and 54 deletions

View file

@ -0,0 +1,8 @@
fn run(f: &fn()) {
f()
}
fn main() {
let f: ~fn() = || ();
run(f);
}