libsyntax: Remove the old-style borrowed closure type syntax from the

language.
This commit is contained in:
Patrick Walton 2013-11-19 18:15:10 -08:00
parent 9e610573ba
commit 6801bc8f55
15 changed files with 32 additions and 23 deletions

View file

@ -9,10 +9,10 @@
// except according to those terms.
struct X {
field: &'static fn:Send(),
field: 'static ||:Send,
}
fn foo(blk: &'static fn:()) -> X {
fn foo(blk: 'static ||:) -> X {
return X { field: blk }; //~ ERROR expected bounds `Send` but found no bounds
}

View file

@ -16,7 +16,7 @@ extern mod extra;
use extra::arc;
use std::util;
fn foo(blk: &once fn()) {
fn foo(blk: once ||) {
blk();
blk(); //~ ERROR use of moved value
}

View file

@ -10,8 +10,8 @@
#[feature(once_fns)];
fn main() {
let f: &once fn() = ||();
let f: once || = ||();
let g: || = f; //~ ERROR mismatched types
let h: || = ||();
let i: &once fn() = h; // ok
let i: once || = h; // ok
}

View file

@ -17,7 +17,7 @@ extern mod extra;
use extra::arc;
use std::util;
fn foo(blk: &once fn()) {
fn foo(blk: once ||) {
blk();
}