fix test to not use fn expr
This commit is contained in:
parent
9792002c6a
commit
078fd23a07
1 changed files with 2 additions and 1 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue