fix test to not use fn expr

This commit is contained in:
Niko Matsakis 2013-03-06 16:19:21 -05:00
parent 9792002c6a
commit 078fd23a07

View file

@ -11,7 +11,8 @@
struct boxedFn { theFn: &'self fn() -> uint }
fn createClosure (closedUint: uint) -> boxedFn {
boxedFn {theFn: @fn () -> uint { closedUint }} //~ ERROR illegal borrow
let theFn: @fn() -> uint = || closedUint;
boxedFn {theFn: theFn} //~ ERROR illegal borrow
}
fn main () {