]> git.lizzy.rs Git - rust.git/commitdiff
Register new snapshots
authorAlex Crichton <alex@alexcrichton.com>
Mon, 7 Apr 2014 20:30:48 +0000 (13:30 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 8 Apr 2014 07:03:11 +0000 (00:03 -0700)
74 files changed:
src/doc/complement-cheatsheet.md
src/doc/rust.md
src/libcollections/deque.rs
src/libgreen/basic.rs
src/liblibc/lib.rs
src/libnative/io/p [new file with mode: 0644]
src/libnative/io/process.rs
src/libnative/task.rs
src/librand/distributions/mod.rs
src/librand/lib.rs
src/librustc/front/config.rs
src/librustc/lib.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/filesearch.rs
src/librustc/metadata/tydecode.rs
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/tvec.rs
src/librustc/middle/ty_fold.rs
src/librustc/middle/typeck/check/regionmanip.rs
src/librustc/middle/typeck/infer/lattice.rs
src/librustc/util/common.rs
src/libstd/c_vec.rs
src/libstd/io/net/unix.rs
src/libstd/iter.rs
src/libstd/lib.rs
src/libstd/rt/at_exit_imp.rs
src/libstd/rt/mod.rs
src/libstd/rt/rtio.rs
src/libstd/rt/task.rs
src/libstd/rt/thread.rs
src/libstd/slice.rs
src/libstd/str.rs
src/libstd/task.rs
src/libstd/unstable/finally.rs
src/libstd/unstable/mod.rs
src/libstd/vec.rs
src/libsync/future.rs
src/libsync/task_pool.rs
src/libsyntax/ast_util.rs
src/libsyntax/ext/deriving/generic.rs
src/libsyntax/parse/parser.rs
src/libtest/lib.rs
src/libworkcache/lib.rs
src/snapshots.txt
src/test/auxiliary/iss.rs
src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs
src/test/compile-fail/issue-4335.rs
src/test/compile-fail/issue-4523.rs
src/test/compile-fail/kindck-nonsendable-1.rs
src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs
src/test/compile-fail/proc-bounds.rs
src/test/compile-fail/regionck-closure-lifetimes.rs
src/test/compile-fail/regions-freevar.rs
src/test/compile-fail/regions-infer-at-fn-not-param.rs
src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs
src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs
src/test/compile-fail/regions-infer-not-param.rs
src/test/compile-fail/regions-steal-closure.rs
src/test/debug-info/recursive-enum.rs
src/test/run-fail/unwind-box-fn-unique.rs
src/test/run-fail/unwind-lambda.rs
src/test/run-pass/clone-with-exterior.rs
src/test/run-pass/closure-syntax.rs
src/test/run-pass/issue-1516.rs
src/test/run-pass/issue-2190-1.rs
src/test/run-pass/issue-3609.rs
src/test/run-pass/last-use-in-cap-clause.rs
src/test/run-pass/proc-bounds.rs
src/test/run-pass/sendfn-spawn-with-fn-arg.rs
src/test/run-pass/tempfile.rs
src/test/run-pass/uniq-cc-generic.rs
src/test/run-pass/uniq-cc.rs

index 4f7583f0855afe6ffe92e0d2870667eb905844d1..328998ba9fa1c1404e638818c275149266412a50 100644 (file)
@@ -152,7 +152,7 @@ struct Foo {
 }
 
 struct FooClosure<'a> {
-    myfunc: 'a |int, uint| -> i32
+    myfunc: |int, uint|: 'a -> i32
 }
 
 fn a(a: int, b: uint) -> i32 {
index 886c95b2c75609314f6b856ef884655a1585dea8..5d505e55d2c91a367f9e2c08b7315ae5ba83f71c 100644 (file)
@@ -3460,7 +3460,7 @@ fn add(x: int, y: int) -> int {
 
 let mut x = add(5,7);
 
-type Binop<'a> = 'a |int,int| -> int;
+type Binop<'a> = |int,int|: 'a -> int;
 let bo: Binop = add;
 x = bo(5,7);
 ~~~~
index 6c1391e7ca816b6c1eb9c78596f967695473b08b..def8f4f35611309c5ed4aadf4365c85ac2af112e 100644 (file)
@@ -96,7 +96,7 @@ pub fn find_rand_n<M:MutableMap<uint,uint>>(n: uint,
             map.insert(*k, 1);
         }
 
-        rng.shuffle_mut(keys);
+        rng.shuffle(keys);
 
         // measure
         let mut i = 0;
index d2599aab14c9fa01bcabff6dd92f9b3b0984f02a..62b6f71ae9c6b94e0a79305a5b619639cb4b42cb 100644 (file)
@@ -27,7 +27,7 @@ pub fn event_loop() -> ~EventLoop:Send {
 }
 
 struct BasicLoop {
-    work: ~[proc:Send()],             // pending work
+    work: ~[proc():Send],             // pending work
     idle: Option<*mut BasicPausable>, // only one is allowed
     remotes: ~[(uint, ~Callback:Send)],
     next_remote: uint,
@@ -135,7 +135,7 @@ fn run(&mut self) {
         }
     }
 
-    fn callback(&mut self, f: proc:Send()) {
+    fn callback(&mut self, f: proc():Send) {
         self.work.push(f);
     }
 
index fc7044ed88ad53ac064e2b7d5fb65a99d9f5b858..6b519fa7b83b7bf674f0a24581455fd126f27d7e 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 #![feature(globs)]
-#![crate_id = "libc#0.10-pre"]
+#![crate_id = "libc#0.11-pre"]
 #![experimental]
 #![no_std] // we don't need std, and we can't have std, since it doesn't exist
            // yet. std depends on us.
@@ -75,8 +75,6 @@
 #![allow(missing_doc)]
 #![allow(uppercase_variables)]
 
-#![feature(link_args)] // NOTE: remove after stage0
-
 #[cfg(test)] extern crate std;
 #[cfg(test)] extern crate test;
 #[cfg(test)] extern crate native;
 #[link(name = "m")]
 extern {}
 
-// NOTE: remove this after a stage0 snap
-#[cfg(stage0, windows)]
-#[link_args = "-Wl,--enable-long-section-names"]
-extern {}
-
 /// A wrapper for a nullable pointer. Don't use this except for interacting
 /// with libc. Basically Option, but without the dependance on libstd.
 // If/when libprim happens, this can be removed in favor of that
diff --git a/src/libnative/io/p b/src/libnative/io/p
new file mode 100644 (file)
index 0000000..e69de29
index d1edea4df710567d5e552ea68cd8566d4ab3bfc6..d4ed52ef140cd8d88fc82df09b0699a8f9c778a2 100644 (file)
@@ -609,7 +609,7 @@ fn setgroups(ngroups: libc::c_int,
 }
 
 #[cfg(unix)]
-fn with_argv<T>(prog: &str, args: &[~str], cb: proc:(**libc::c_char) -> T) -> T {
+fn with_argv<T>(prog: &str, args: &[~str], cb: proc(**libc::c_char) -> T) -> T {
     use std::slice;
 
     // We can't directly convert `str`s into `*char`s, as someone needs to hold
@@ -635,7 +635,7 @@ fn with_argv<T>(prog: &str, args: &[~str], cb: proc:(**libc::c_char) -> T) -> T
 }
 
 #[cfg(unix)]
-fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: proc:(*c_void) -> T) -> T {
+fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: proc(*c_void) -> T) -> T {
     use std::slice;
 
     // On posixy systems we can pass a char** for envp, which is a
index 662c6417ca82e6c99446f3bd0ab384b08716a567..871fc94bde46a73641ebf4306ebe81c6ba2372fe 100644 (file)
@@ -50,13 +50,13 @@ fn ops() -> ~Ops {
 }
 
 /// Spawns a function with the default configuration
-pub fn spawn(f: proc:Send()) {
+pub fn spawn(f: proc():Send) {
     spawn_opts(TaskOpts::new(), f)
 }
 
 /// Spawns a new task given the configuration options and a procedure to run
 /// inside the task.
-pub fn spawn_opts(opts: TaskOpts, f: proc:Send()) {
+pub fn spawn_opts(opts: TaskOpts, f: proc():Send) {
     let TaskOpts {
         notify_chan, name, stack_size,
         stderr, stdout,
@@ -238,7 +238,7 @@ fn reawaken(mut ~self, mut to_wake: ~Task) {
         }
     }
 
-    fn spawn_sibling(~self, mut cur_task: ~Task, opts: TaskOpts, f: proc:Send()) {
+    fn spawn_sibling(~self, mut cur_task: ~Task, opts: TaskOpts, f: proc():Send) {
         cur_task.put_runtime(self);
         Local::put(cur_task);
 
index af63e52e885aa5ab0b3a22c92df82fa30dc699fb..b3535a695eaf310e331350dd44c38a2a3e711dce 100644 (file)
@@ -209,8 +209,8 @@ fn ziggurat<R:Rng>(
             symmetric: bool,
             x_tab: ziggurat_tables::ZigTable,
             f_tab: ziggurat_tables::ZigTable,
-            pdf: 'static |f64| -> f64,
-            zero_case: 'static |&mut R, f64| -> f64)
+            pdf: |f64|: 'static -> f64,
+            zero_case: |&mut R, f64|: 'static -> f64)
             -> f64 {
     static SCALE: f64 = (1u64 << 53) as f64;
     loop {
index 57b910093e0ea9296f7d590e891c17c2817ee01a..c9e4c81901e7e4721433b0fd9c3ed4625e229b56 100644 (file)
@@ -801,7 +801,7 @@ fn test_choose_option() {
     #[test]
     fn test_shuffle() {
         let mut r = task_rng();
-        let mut empty: &mut [int] = &mut [];
+        let empty: &mut [int] = &mut [];
         r.shuffle(empty);
         let mut one = [1];
         r.shuffle(one);
index cfbe772a165db032ed4596f701f5511e24300054..703ff51b3b0e206532019cd34e910f195eed35ee 100644 (file)
@@ -13,7 +13,7 @@
 use syntax::codemap;
 
 struct Context<'a> {
-    in_cfg: 'a |attrs: &[ast::Attribute]| -> bool,
+    in_cfg: |attrs: &[ast::Attribute]|: 'a -> bool,
 }
 
 // Support conditional compilation by transforming the AST, stripping out
index 95627cd1039af50a15a61a4c7b0f2038e8641e61..3f72be673e0a00aae4c3f9f1f134dbe52cd97a33 100644 (file)
@@ -364,7 +364,7 @@ fn parse_crate_attrs(sess: &session::Session, input: &d::Input) ->
 ///
 /// The diagnostic emitter yielded to the procedure should be used for reporting
 /// errors of the compiler.
-pub fn monitor(f: proc:Send()) {
+pub fn monitor(f: proc():Send) {
     // FIXME: This is a hack for newsched since it doesn't support split stacks.
     // rustc needs a lot of stack! When optimizations are disabled, it needs
     // even *more* stack than usual as well.
index 556f0a38b03544a6049ff9aec2d0cea3e7a65fdc..40f0b719f2dcb3374c65ffb43d585b0d8a811053 100644 (file)
@@ -76,7 +76,7 @@ fn lookup_hash<'a>(d: ebml::Doc<'a>, eq_fn: |&[u8]| -> bool,
     ret
 }
 
-pub type GetCrateDataCb<'a> = 'a |ast::CrateNum| -> Cmd;
+pub type GetCrateDataCb<'a> = |ast::CrateNum|: 'a -> Cmd;
 
 pub fn maybe_find_item<'a>(item_id: ast::NodeId,
                            items: ebml::Doc<'a>) -> Option<ebml::Doc<'a>> {
@@ -637,11 +637,11 @@ pub fn get_item_path(cdata: Cmd, id: ast::NodeId) -> Vec<ast_map::PathElem> {
     item_path(lookup_item(id, cdata.data()))
 }
 
-pub type DecodeInlinedItem<'a> = 'a |cdata: @cstore::crate_metadata,
-                                     tcx: &ty::ctxt,
-                                     path: Vec<ast_map::PathElem>,
-                                     par_doc: ebml::Doc|
-                                     -> Result<ast::InlinedItem, Vec<ast_map::PathElem> >;
+pub type DecodeInlinedItem<'a> = |cdata: @cstore::crate_metadata,
+                                  tcx: &ty::ctxt,
+                                  path: Vec<ast_map::PathElem>,
+                                  par_doc: ebml::Doc|: 'a
+                                  -> Result<ast::InlinedItem, Vec<ast_map::PathElem> >;
 
 pub fn maybe_get_item_ast(cdata: Cmd, tcx: &ty::ctxt, id: ast::NodeId,
                           decode_inlined_item: DecodeInlinedItem)
index e453acac8109e74ffbf1bb390e9b600de8f1d34e..fcb0e3136a76e010b3874f25db136cfb09d9bde1 100644 (file)
@@ -64,9 +64,9 @@ pub enum InlinedItemRef<'a> {
 
 pub type Encoder<'a> = writer::Encoder<'a, MemWriter>;
 
-pub type EncodeInlinedItem<'a> = 'a |ecx: &EncodeContext,
-                                     ebml_w: &mut Encoder,
-                                     ii: InlinedItemRef|;
+pub type EncodeInlinedItem<'a> = |ecx: &EncodeContext,
+                                  ebml_w: &mut Encoder,
+                                  ii: InlinedItemRef|: 'a;
 
 pub struct EncodeParams<'a> {
     pub diag: &'a SpanHandler,
index b83f42da0a05681129522e205728ef45f60941dd..7a531c5c128bfbe49abb9745bcb8d3a11e51f928 100644 (file)
@@ -23,7 +23,7 @@ pub enum FileMatch { FileMatches, FileDoesntMatch }
 
 /// Functions with type `pick` take a parent directory as well as
 /// a file found in that directory.
-pub type pick<'a> = 'a |path: &Path| -> FileMatch;
+pub type pick<'a> = |path: &Path|: 'a -> FileMatch;
 
 pub struct FileSearch<'a> {
     pub sysroot: &'a Path,
index 73fc089d930bfbb3e173a6fd4102c7bcc2744870..599a1dad33d22a56124abeb920f890598e0d769e 100644 (file)
@@ -54,7 +54,7 @@ pub enum DefIdSource {
     RegionParameter,
 }
 pub type conv_did<'a> =
-    'a |source: DefIdSource, ast::DefId| -> ast::DefId;
+    |source: DefIdSource, ast::DefId|: 'a -> ast::DefId;
 
 pub struct PState<'a> {
     data: &'a [u8],
index c4fe5a3ebbba66bc9fe97e8b7b7a5dff19eb7a0a..49163ce96996728ac6b5bfdef8094a32727843de 100644 (file)
@@ -503,7 +503,7 @@ fn assert_is_binding_or_wild(bcx: &Block, p: @ast::Pat) {
     }
 }
 
-type enter_pat<'a> = 'a |@ast::Pat| -> Option<Vec<@ast::Pat>>;
+type enter_pat<'a> = |@ast::Pat|: 'a -> Option<Vec<@ast::Pat>>;
 
 fn enter_match<'r,'b>(
                bcx: &'b Block<'b>,
index 58edb717bf0bda87f0440616028e0685a88bdfb3..d5646c611a0410201f5df98e01bfa28e723ed78d 100644 (file)
@@ -613,7 +613,7 @@ fn die(cx: &Block) -> ! {
 }
 
 pub type val_and_ty_fn<'r,'b> =
-    'r |&'b Block<'b>, ValueRef, ty::t| -> &'b Block<'b>;
+    |&'b Block<'b>, ValueRef, ty::t|: 'r -> &'b Block<'b>;
 
 // Iterates through the elements of a structural type.
 pub fn iter_structural_ty<'r,
index 1f2147b02e55c38e696e3e7c4e27c761436d5460..73370357a92b118563969326c471e006be1795e5 100644 (file)
@@ -525,7 +525,7 @@ pub fn get_base_and_len(bcx: &Block,
 }
 
 pub type iter_vec_block<'r,'b> =
-    'r |&'b Block<'b>, ValueRef, ty::t| -> &'b Block<'b>;
+    |&'b Block<'b>, ValueRef, ty::t|: 'r -> &'b Block<'b>;
 
 pub fn iter_vec_loop<'r,
                      'b>(
index 686452a5e443ca5d54b93eceff13cca1d14e3974..8b14741f88145e50247dc631f56032889696ff3a 100644 (file)
@@ -217,7 +217,7 @@ pub fn super_fold_trait_store<T:TypeFolder>(this: &mut T,
 
 pub struct BottomUpFolder<'a> {
     pub tcx: &'a ty::ctxt,
-    pub fldop: 'a |ty::t| -> ty::t,
+    pub fldop: |ty::t|: 'a -> ty::t,
 }
 
 impl<'a> TypeFolder for BottomUpFolder<'a> {
@@ -234,14 +234,14 @@ fn fold_ty(&mut self, ty: ty::t) -> ty::t {
 
 pub struct RegionFolder<'a> {
     tcx: &'a ty::ctxt,
-    fld_t: 'a |ty::t| -> ty::t,
-    fld_r: 'a |ty::Region| -> ty::Region,
+    fld_t: |ty::t|: 'a -> ty::t,
+    fld_r: |ty::Region|: 'a -> ty::Region,
 }
 
 impl<'a> RegionFolder<'a> {
     pub fn general(tcx: &'a ty::ctxt,
-                   fld_r: 'a |ty::Region| -> ty::Region,
-                   fld_t: 'a |ty::t| -> ty::t)
+                   fld_r: |ty::Region|: 'a -> ty::Region,
+                   fld_t: |ty::t|: 'a -> ty::t)
                    -> RegionFolder<'a> {
         RegionFolder {
             tcx: tcx,
@@ -250,7 +250,7 @@ pub fn general(tcx: &'a ty::ctxt,
         }
     }
 
-    pub fn regions(tcx: &'a ty::ctxt, fld_r: 'a |ty::Region| -> ty::Region)
+    pub fn regions(tcx: &'a ty::ctxt, fld_r: |ty::Region|: 'a -> ty::Region)
                    -> RegionFolder<'a> {
         fn noop(t: ty::t) -> ty::t { t }
 
index 8f59bb2800074d9aab49648b656419f0056db83b..febf47add4339b545557bf784a23f205b7e8b8d3 100644 (file)
@@ -86,7 +86,7 @@ pub fn relate_nested_regions(tcx: &ty::ctxt,
     struct RegionRelator<'a> {
         tcx: &'a ty::ctxt,
         stack: Vec<ty::Region>,
-        relate_op: 'a |ty::Region, ty::Region|,
+        relate_op: |ty::Region, ty::Region|: 'a,
     }
 
     // FIXME(#10151) -- Define more precisely when a region is
index 000d2843cca9c6b874342801417c14a9060a2047..83cc929424448b1e3822b4ee1f3a6949223da02e 100644 (file)
@@ -54,7 +54,7 @@ pub trait LatticeValue {
 }
 
 pub type LatticeOp<'a, T> =
-    'a |cf: &CombineFields, a: &T, b: &T| -> cres<T>;
+    |cf: &CombineFields, a: &T, b: &T|: 'a -> cres<T>;
 
 impl LatticeValue for ty::t {
     fn sub(cf: &CombineFields, a: &ty::t, b: &ty::t) -> ures {
@@ -407,7 +407,7 @@ pub fn super_lattice_tys<L:LatticeDir+TyLatticeDir+Combine>(this: &L,
     }
 }
 
-pub type LatticeDirOp<'a, T> = 'a |a: &T, b: &T| -> cres<T>;
+pub type LatticeDirOp<'a, T> = |a: &T, b: &T|: 'a -> cres<T>;
 
 #[deriving(Clone)]
 pub enum LatticeVarResult<V,T> {
index ce8a34c4c23f5f5314c3fcb9da9314722eaadabd..0d14c036ba7f1cb2cc414829ca9b602cf110b11a 100644 (file)
@@ -64,7 +64,7 @@ pub fn indenter() -> _indenter {
 }
 
 struct LoopQueryVisitor<'a> {
-    p: 'a |&ast::Expr_| -> bool,
+    p: |&ast::Expr_|: 'a -> bool,
     flag: bool,
 }
 
@@ -92,7 +92,7 @@ pub fn loop_query(b: &ast::Block, p: |&ast::Expr_| -> bool) -> bool {
 }
 
 struct BlockQueryVisitor<'a> {
-    p: 'a |&ast::Expr| -> bool,
+    p: |&ast::Expr|: 'a -> bool,
     flag: bool,
 }
 
index 3b6b914cf14e55f81993c07b960bd63715f2d693..4ef5af9275c875140c9e408189da13bc54ec3913 100644 (file)
@@ -46,7 +46,7 @@
 pub struct CVec<T> {
     base: *mut T,
     len: uint,
-    dtor: Option<proc:Send()>,
+    dtor: Option<proc():Send>,
 }
 
 #[unsafe_destructor]
@@ -90,7 +90,7 @@ pub unsafe fn new(base: *mut T, len: uint) -> CVec<T> {
     /// * dtor - A proc to run when the value is destructed, useful
     ///          for freeing the buffer, etc.
     pub unsafe fn new_with_dtor(base: *mut T, len: uint,
-                                dtor: proc:Send()) -> CVec<T> {
+                                dtor: proc():Send) -> CVec<T> {
         assert!(base != ptr::mut_null());
         CVec {
             base: base,
index 0d64a7b141ec6c06fd521c0a405b363cef665fb5..a58cdbdba446f7e483c1c229123c8d6fc2af60f3 100644 (file)
@@ -141,7 +141,7 @@ mod tests {
     use io::*;
     use io::test::*;
 
-    pub fn smalltest(server: proc:Send(UnixStream), client: proc:Send(UnixStream)) {
+    pub fn smalltest(server: proc(UnixStream):Send, client: proc(UnixStream):Send) {
         let path1 = next_test_unix();
         let path2 = path1.clone();
 
index d7424fc9f61a1eaad347b7a9b9c702d1659cd121..1c7579e6b8e75c129f6b57fe45914e0fdc5e9c34 100644 (file)
@@ -156,7 +156,7 @@ fn zip<B, U: Iterator<B>>(self, other: U) -> Zip<Self, U> {
     /// assert!(it.next().is_none());
     /// ```
     #[inline]
-    fn map<'r, B>(self, f: 'r |A| -> B) -> Map<'r, A, B, Self> {
+    fn map<'r, B>(self, f: |A|: 'r -> B) -> Map<'r, A, B, Self> {
         Map{iter: self, f: f}
     }
 
@@ -173,7 +173,7 @@ fn map<'r, B>(self, f: 'r |A| -> B) -> Map<'r, A, B, Self> {
     /// assert!(it.next().is_none());
     /// ```
     #[inline]
-    fn filter<'r>(self, predicate: 'r |&A| -> bool) -> Filter<'r, A, Self> {
+    fn filter<'r>(self, predicate: |&A|: 'r -> bool) -> Filter<'r, A, Self> {
         Filter{iter: self, predicate: predicate}
     }
 
@@ -190,7 +190,7 @@ fn filter<'r>(self, predicate: 'r |&A| -> bool) -> Filter<'r, A, Self> {
     /// assert!(it.next().is_none());
     /// ```
     #[inline]
-    fn filter_map<'r, B>(self, f: 'r |A| -> Option<B>) -> FilterMap<'r, A, B, Self> {
+    fn filter_map<'r, B>(self, f: |A|: 'r -> Option<B>) -> FilterMap<'r, A, B, Self> {
         FilterMap { iter: self, f: f }
     }
 
@@ -249,7 +249,7 @@ fn peekable(self) -> Peekable<A, Self> {
     /// assert!(it.next().is_none());
     /// ```
     #[inline]
-    fn skip_while<'r>(self, predicate: 'r |&A| -> bool) -> SkipWhile<'r, A, Self> {
+    fn skip_while<'r>(self, predicate: |&A|: 'r -> bool) -> SkipWhile<'r, A, Self> {
         SkipWhile{iter: self, flag: false, predicate: predicate}
     }
 
@@ -267,7 +267,7 @@ fn skip_while<'r>(self, predicate: 'r |&A| -> bool) -> SkipWhile<'r, A, Self> {
     /// assert!(it.next().is_none());
     /// ```
     #[inline]
-    fn take_while<'r>(self, predicate: 'r |&A| -> bool) -> TakeWhile<'r, A, Self> {
+    fn take_while<'r>(self, predicate: |&A|: 'r -> bool) -> TakeWhile<'r, A, Self> {
         TakeWhile{iter: self, flag: false, predicate: predicate}
     }
 
@@ -327,7 +327,7 @@ fn take(self, n: uint) -> Take<Self> {
     /// assert!(it.next().is_none());
     /// ```
     #[inline]
-    fn scan<'r, St, B>(self, initial_state: St, f: 'r |&mut St, A| -> Option<B>)
+    fn scan<'r, St, B>(self, initial_state: St, f: |&mut St, A|: 'r -> Option<B>)
         -> Scan<'r, A, B, Self, St> {
         Scan{iter: self, f: f, state: initial_state}
     }
@@ -351,7 +351,7 @@ fn scan<'r, St, B>(self, initial_state: St, f: 'r |&mut St, A| -> Option<B>)
     /// }
     /// ```
     #[inline]
-    fn flat_map<'r, B, U: Iterator<B>>(self, f: 'r |A| -> U)
+    fn flat_map<'r, B, U: Iterator<B>>(self, f: |A|: 'r -> U)
         -> FlatMap<'r, A, Self, U> {
         FlatMap{iter: self, f: f, frontiter: None, backiter: None }
     }
@@ -405,7 +405,7 @@ fn fuse(self) -> Fuse<Self> {
     /// println!("{}", sum);
     /// ```
     #[inline]
-    fn inspect<'r>(self, f: 'r |&A|) -> Inspect<'r, A, Self> {
+    fn inspect<'r>(self, f: |&A|: 'r) -> Inspect<'r, A, Self> {
         Inspect{iter: self, f: f}
     }
 
@@ -1235,7 +1235,7 @@ fn idx(&self, index: uint) -> Option<(A, B)> {
 /// An iterator which maps the values of `iter` with `f`
 pub struct Map<'a, A, B, T> {
     iter: T,
-    f: 'a |A| -> B
+    f: |A|: 'a -> B
 }
 
 impl<'a, A, B, T> Map<'a, A, B, T> {
@@ -1284,7 +1284,7 @@ fn idx(&self, index: uint) -> Option<B> {
 /// An iterator which filters the elements of `iter` with `predicate`
 pub struct Filter<'a, A, T> {
     iter: T,
-    predicate: 'a |&A| -> bool
+    predicate: |&A|: 'a -> bool
 }
 
 impl<'a, A, T: Iterator<A>> Iterator<A> for Filter<'a, A, T> {
@@ -1328,7 +1328,7 @@ fn next_back(&mut self) -> Option<A> {
 /// An iterator which uses `f` to both filter and map elements from `iter`
 pub struct FilterMap<'a, A, B, T> {
     iter: T,
-    f: 'a |A| -> Option<B>
+    f: |A|: 'a -> Option<B>
 }
 
 impl<'a, A, B, T: Iterator<A>> Iterator<B> for FilterMap<'a, A, B, T> {
@@ -1477,7 +1477,7 @@ pub fn is_empty(&mut self) -> bool {
 pub struct SkipWhile<'a, A, T> {
     iter: T,
     flag: bool,
-    predicate: 'a |&A| -> bool
+    predicate: |&A|: 'a -> bool
 }
 
 impl<'a, A, T: Iterator<A>> Iterator<A> for SkipWhile<'a, A, T> {
@@ -1515,7 +1515,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 pub struct TakeWhile<'a, A, T> {
     iter: T,
     flag: bool,
-    predicate: 'a |&A| -> bool
+    predicate: |&A|: 'a -> bool
 }
 
 impl<'a, A, T: Iterator<A>> Iterator<A> for TakeWhile<'a, A, T> {
@@ -1662,7 +1662,7 @@ fn idx(&self, index: uint) -> Option<A> {
 /// An iterator to maintain state while iterating another iterator
 pub struct Scan<'a, A, B, T, St> {
     iter: T,
-    f: 'a |&mut St, A| -> Option<B>,
+    f: |&mut St, A|: 'a -> Option<B>,
 
     /// The current internal state to be passed to the closure next.
     pub state: St,
@@ -1686,7 +1686,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 ///
 pub struct FlatMap<'a, A, T, U> {
     iter: T,
-    f: 'a |A| -> U,
+    f: |A|: 'a -> U,
     frontiter: Option<U>,
     backiter: Option<U>,
 }
@@ -1817,7 +1817,7 @@ pub fn reset_fuse(&mut self) {
 /// element before yielding it.
 pub struct Inspect<'a, A, T> {
     iter: T,
-    f: 'a |&A|
+    f: |&A|: 'a
 }
 
 impl<'a, A, T> Inspect<'a, A, T> {
@@ -1869,7 +1869,7 @@ fn idx(&self, index: uint) -> Option<A> {
 
 /// An iterator which just modifies the contained state throughout iteration.
 pub struct Unfold<'a, A, St> {
-    f: 'a |&mut St| -> Option<A>,
+    f: |&mut St|: 'a -> Option<A>,
     /// Internal state that will be yielded on the next iteration
     pub state: St,
 }
@@ -1878,7 +1878,7 @@ impl<'a, A, St> Unfold<'a, A, St> {
     /// Creates a new iterator with the specified closure as the "iterator
     /// function" and an initial state to eventually pass to the iterator
     #[inline]
-    pub fn new<'a>(initial_state: St, f: 'a |&mut St| -> Option<A>)
+    pub fn new<'a>(initial_state: St, f: |&mut St|: 'a -> Option<A>)
                -> Unfold<'a, A, St> {
         Unfold {
             f: f,
index 1a5ca76d5c05dc1a665a8187e90a59f7f064e3f7..985f8a8eb0a1e1685764bf2374cc1cb227ce8250 100644 (file)
@@ -58,7 +58,6 @@
 #![no_std]
 
 #![deny(missing_doc)]
-#![allow(unknown_features)] // NOTE: remove after a stage0 snap
 
 // When testing libstd, bring in libuv as the I/O backend so tests can print
 // things and all of the std::io tests have an I/O interface to run on top
index a5bfaf190d9066d516d617073a8ff53c617eb0e7..4be9c8a84acd38659f4ecb09a8ba26f8a856b355 100644 (file)
@@ -21,7 +21,7 @@
 use unstable::sync::Exclusive;
 use slice::OwnedVector;
 
-type Queue = Exclusive<~[proc:Send()]>;
+type Queue = Exclusive<~[proc():Send]>;
 
 // You'll note that these variables are *not* atomic, and this is done on
 // purpose. This module is designed to have init() called *once* in a
@@ -40,7 +40,7 @@ pub fn init() {
     }
 }
 
-pub fn push(f: proc:Send()) {
+pub fn push(f: proc():Send) {
     unsafe {
         rtassert!(!RUNNING);
         rtassert!(!QUEUE.is_null());
index 5e2f8efd2e35c08d2ebea13ae537aeb5837824f8..f4a4fd9ab2e9b34072e814b66b16a4da15f6b3b0 100644 (file)
@@ -157,7 +157,7 @@ fn deschedule(~self, times: uint, cur_task: ~Task,
 
     // Miscellaneous calls which are very different depending on what context
     // you're in.
-    fn spawn_sibling(~self, cur_task: ~Task, opts: TaskOpts, f: proc:Send());
+    fn spawn_sibling(~self, cur_task: ~Task, opts: TaskOpts, f: proc():Send);
     fn local_io<'a>(&'a mut self) -> Option<rtio::LocalIo<'a>>;
     /// The (low, high) edges of the current stack.
     fn stack_bounds(&self) -> (uint, uint); // (lo, hi)
@@ -196,7 +196,7 @@ pub fn init(argc: int, argv: **u8) {
 ///
 /// It is forbidden for procedures to register more `at_exit` handlers when they
 /// are running, and doing so will lead to a process abort.
-pub fn at_exit(f: proc:Send()) {
+pub fn at_exit(f: proc():Send) {
     at_exit_imp::push(f);
 }
 
index 54708d19a1b4fdff06ac2edec71dece59a9e40f7..1750e685627d8a1deebb093d23bc1d6a4187ad51 100644 (file)
@@ -36,7 +36,7 @@ pub trait Callback {
 
 pub trait EventLoop {
     fn run(&mut self);
-    fn callback(&mut self, arg: proc:Send());
+    fn callback(&mut self, arg: proc():Send);
     fn pausable_idle_callback(&mut self,
                               ~Callback:Send) -> ~PausableIdleCallback:Send;
     fn remote_callback(&mut self, ~Callback:Send) -> ~RemoteCallback:Send;
index fc266df11e4be4a1f36b69678e19739044cf84d7..bae20d3bb9b9072c90f6712519eb50d03451f273 100644 (file)
@@ -70,7 +70,7 @@ pub enum BlockedTask {
 pub enum DeathAction {
     /// Action to be done with the exit code. If set, also makes the task wait
     /// until all its watched children exit before collecting the status.
-    Execute(proc:Send(TaskResult)),
+    Execute(proc(TaskResult):Send),
     /// A channel to send the result of the task on when the task exits
     SendMessage(Sender<TaskResult>),
 }
@@ -236,7 +236,7 @@ pub fn maybe_take_runtime<T: 'static>(&mut self) -> Option<~T> {
 
     /// Spawns a sibling to this task. The newly spawned task is configured with
     /// the `opts` structure and will run `f` as the body of its code.
-    pub fn spawn_sibling(mut ~self, opts: TaskOpts, f: proc:Send()) {
+    pub fn spawn_sibling(mut ~self, opts: TaskOpts, f: proc():Send) {
         let ops = self.imp.take_unwrap();
         ops.spawn_sibling(self, opts, f)
     }
index c35ffac064cfd8e1378434937189cac219c0e1f2..b1c7c5aab020f0cb2135d2adedb7bd8b6d213569 100644 (file)
@@ -68,13 +68,13 @@ impl Thread<()> {
     /// to finish executing. This means that even if `join` is not explicitly
     /// called, when the `Thread` falls out of scope its destructor will block
     /// waiting for the OS thread.
-    pub fn start<T: Send>(main: proc:Send() -> T) -> Thread<T> {
+    pub fn start<T: Send>(main: proc():Send -> T) -> Thread<T> {
         Thread::start_stack(DEFAULT_STACK_SIZE, main)
     }
 
     /// Performs the same functionality as `start`, but specifies an explicit
     /// stack size for the new thread.
-    pub fn start_stack<T: Send>(stack: uint, main: proc:Send() -> T) -> Thread<T> {
+    pub fn start_stack<T: Send>(stack: uint, main: proc():Send -> T) -> Thread<T> {
 
         // We need the address of the packet to fill in to be stable so when
         // `main` fills it in it's still valid, so allocate an extra ~ box to do
@@ -99,13 +99,13 @@ pub fn start_stack<T: Send>(stack: uint, main: proc:Send() -> T) -> Thread<T> {
     /// This corresponds to creating threads in the 'detached' state on unix
     /// systems. Note that platforms may not keep the main program alive even if
     /// there are detached thread still running around.
-    pub fn spawn(main: proc:Send()) {
+    pub fn spawn(main: proc():Send) {
         Thread::spawn_stack(DEFAULT_STACK_SIZE, main)
     }
 
     /// Performs the same functionality as `spawn`, but explicitly specifies a
     /// stack size for the new thread.
-    pub fn spawn_stack(stack: uint, main: proc:Send()) {
+    pub fn spawn_stack(stack: uint, main: proc():Send) {
         unsafe {
             let handle = imp::create(stack, ~main);
             imp::detach(handle);
@@ -156,7 +156,7 @@ mod imp {
     pub type rust_thread = HANDLE;
     pub type rust_thread_return = DWORD;
 
-    pub unsafe fn create(stack: uint, p: ~proc:Send()) -> rust_thread {
+    pub unsafe fn create(stack: uint, p: ~proc():Send) -> rust_thread {
         let arg: *mut libc::c_void = cast::transmute(p);
         // FIXME On UNIX, we guard against stack sizes that are too small but
         // that's because pthreads enforces that stacks are at least
@@ -215,7 +215,7 @@ mod imp {
     pub type rust_thread = libc::pthread_t;
     pub type rust_thread_return = *u8;
 
-    pub unsafe fn create(stack: uint, p: ~proc:Send()) -> rust_thread {
+    pub unsafe fn create(stack: uint, p: ~proc():Send) -> rust_thread {
         let mut native: libc::pthread_t = mem::uninit();
         let mut attr: libc::pthread_attr_t = mem::uninit();
         assert_eq!(pthread_attr_init(&mut attr), 0);
index f15e3e61ca1f850e809c063677eb21949eaef0fd..fced9b5dd5b9448858c3ed21b0d12d72a14e7a3f 100644 (file)
@@ -235,7 +235,7 @@ pub fn mut_ref_slice<'a, A>(s: &'a mut A) -> &'a mut [A] {
 pub struct Splits<'a, T> {
     v: &'a [T],
     n: uint,
-    pred: 'a |t: &T| -> bool,
+    pred: |t: &T|: 'a -> bool,
     finished: bool
 }
 
@@ -284,7 +284,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 pub struct RevSplits<'a, T> {
     v: &'a [T],
     n: uint,
-    pred: 'a |t: &T| -> bool,
+    pred: |t: &T|: 'a -> bool,
     finished: bool
 }
 
@@ -810,23 +810,23 @@ pub trait ImmutableVector<'a, T> {
     /// Returns an iterator over the subslices of the vector which are
     /// separated by elements that match `pred`.  The matched element
     /// is not contained in the subslices.
-    fn split(self, pred: 'a |&T| -> bool) -> Splits<'a, T>;
+    fn split(self, pred: |&T|: 'a -> bool) -> Splits<'a, T>;
     /// Returns an iterator over the subslices of the vector which are
     /// separated by elements that match `pred`, limited to splitting
     /// at most `n` times.  The matched element is not contained in
     /// the subslices.
-    fn splitn(self, n: uint, pred: 'a |&T| -> bool) -> Splits<'a, T>;
+    fn splitn(self, n: uint, pred: |&T|: 'a -> bool) -> Splits<'a, T>;
     /// Returns an iterator over the subslices of the vector which are
     /// separated by elements that match `pred`. This starts at the
     /// end of the vector and works backwards.  The matched element is
     /// not contained in the subslices.
-    fn rsplit(self, pred: 'a |&T| -> bool) -> RevSplits<'a, T>;
+    fn rsplit(self, pred: |&T|: 'a -> bool) -> RevSplits<'a, T>;
     /// Returns an iterator over the subslices of the vector which are
     /// separated by elements that match `pred` limited to splitting
     /// at most `n` times. This starts at the end of the vector and
     /// works backwards.  The matched element is not contained in the
     /// subslices.
-    fn rsplitn(self,  n: uint, pred: 'a |&T| -> bool) -> RevSplits<'a, T>;
+    fn rsplitn(self,  n: uint, pred: |&T|: 'a -> bool) -> RevSplits<'a, T>;
 
     /**
      * Returns an iterator over all contiguous windows of length
@@ -1003,12 +1003,12 @@ fn rev_iter(self) -> RevItems<'a, T> {
     }
 
     #[inline]
-    fn split(self, pred: 'a |&T| -> bool) -> Splits<'a, T> {
+    fn split(self, pred: |&T|: 'a -> bool) -> Splits<'a, T> {
         self.splitn(uint::MAX, pred)
     }
 
     #[inline]
-    fn splitn(self, n: uint, pred: 'a |&T| -> bool) -> Splits<'a, T> {
+    fn splitn(self, n: uint, pred: |&T|: 'a -> bool) -> Splits<'a, T> {
         Splits {
             v: self,
             n: n,
@@ -1018,12 +1018,12 @@ fn splitn(self, n: uint, pred: 'a |&T| -> bool) -> Splits<'a, T> {
     }
 
     #[inline]
-    fn rsplit(self, pred: 'a |&T| -> bool) -> RevSplits<'a, T> {
+    fn rsplit(self, pred: |&T|: 'a -> bool) -> RevSplits<'a, T> {
         self.rsplitn(uint::MAX, pred)
     }
 
     #[inline]
-    fn rsplitn(self, n: uint, pred: 'a |&T| -> bool) -> RevSplits<'a, T> {
+    fn rsplitn(self, n: uint, pred: |&T|: 'a -> bool) -> RevSplits<'a, T> {
         RevSplits {
             v: self,
             n: n,
@@ -2027,7 +2027,7 @@ pub trait MutableVector<'a, T> {
     /// Returns an iterator over the mutable subslices of the vector
     /// which are separated by elements that match `pred`.  The
     /// matched element is not contained in the subslices.
-    fn mut_split(self, pred: 'a |&T| -> bool) -> MutSplits<'a, T>;
+    fn mut_split(self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T>;
 
     /**
      * Returns an iterator over `size` elements of the vector at a time.
@@ -2299,7 +2299,7 @@ fn mut_rev_iter(self) -> RevMutItems<'a, T> {
     }
 
     #[inline]
-    fn mut_split(self, pred: 'a |&T| -> bool) -> MutSplits<'a, T> {
+    fn mut_split(self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T> {
         MutSplits { v: self, pred: pred, finished: false }
     }
 
@@ -2736,7 +2736,7 @@ fn clone(&self) -> Items<'a, T> { *self }
 /// by elements that match `pred`.
 pub struct MutSplits<'a, T> {
     v: &'a mut [T],
-    pred: 'a |t: &T| -> bool,
+    pred: |t: &T|: 'a -> bool,
     finished: bool
 }
 
index 1d80af70b97560c674ab78af99de0142ad4d3501..e24011ca021d0ee3e66fd9be886b639de73fbba8 100644 (file)
@@ -241,7 +241,7 @@ fn matches(&self, c: char) -> bool { *self == c }
     fn only_ascii(&self) -> bool { (*self as uint) < 128 }
 }
 
-impl<'a> CharEq for 'a |char| -> bool {
+impl<'a> CharEq for |char|: 'a -> bool {
     #[inline]
     fn matches(&self, c: char) -> bool { (*self)(c) }
 
index a3d919921ae6d2b281e6a3d46975ebe7cf9a6bb4..ed10f6d15cd662c822e99d691df84b1eafb77888 100644 (file)
@@ -86,7 +86,7 @@ pub struct TaskOpts {
 pub struct TaskBuilder {
     /// Options to spawn the new task with
     pub opts: TaskOpts,
-    gen_body: Option<proc:Send(v: proc:Send()) -> proc:Send()>,
+    gen_body: Option<proc(v: proc():Send):Send -> proc():Send>,
     nocopy: Option<marker::NoCopy>,
 }
 
@@ -151,7 +151,7 @@ pub fn named<S: IntoMaybeOwned<'static>>(mut self, name: S) -> TaskBuilder {
      * existing body generator to the new body generator.
      */
     pub fn with_wrapper(mut self,
-                        wrapper: proc:Send(v: proc:Send()) -> proc:Send())
+                        wrapper: proc(v: proc():Send):Send -> proc():Send)
         -> TaskBuilder
     {
         self.gen_body = match self.gen_body.take() {
@@ -168,7 +168,7 @@ pub fn with_wrapper(mut self,
      * the provided unique closure. The task has the properties and behavior
      * specified by the task_builder.
      */
-    pub fn spawn(mut self, f: proc:Send()) {
+    pub fn spawn(mut self, f: proc():Send) {
         let gen_body = self.gen_body.take();
         let f = match gen_body {
             Some(gen) => gen(f),
@@ -191,7 +191,7 @@ pub fn spawn(mut self, f: proc:Send()) {
      * # Failure
      * Fails if a future_result was already set for this task.
      */
-    pub fn try<T:Send>(mut self, f: proc:Send() -> T) -> Result<T, ~Any:Send> {
+    pub fn try<T:Send>(mut self, f: proc():Send -> T) -> Result<T, ~Any:Send> {
         let (tx, rx) = channel();
 
         let result = self.future_result();
@@ -233,12 +233,12 @@ pub fn new() -> TaskOpts {
 /// the provided unique closure.
 ///
 /// This function is equivalent to `task().spawn(f)`.
-pub fn spawn(f: proc:Send()) {
+pub fn spawn(f: proc():Send) {
     let task = task();
     task.spawn(f)
 }
 
-pub fn try<T:Send>(f: proc:Send() -> T) -> Result<T, ~Any:Send> {
+pub fn try<T:Send>(f: proc():Send -> T) -> Result<T, ~Any:Send> {
     /*!
      * Execute a function in another task and return either the return value
      * of the function or result::err.
@@ -338,7 +338,7 @@ fn test_run_basic() {
 fn test_with_wrapper() {
     let (tx, rx) = channel();
     task().with_wrapper(proc(body) {
-        let result: proc:Send() = proc() {
+        let result: proc():Send = proc() {
             body();
             tx.send(());
         };
@@ -424,7 +424,7 @@ fn test_spawn_sched_childs_on_default_sched() {
 }
 
 #[cfg(test)]
-fn avoid_copying_the_body(spawnfn: |v: proc:Send()|) {
+fn avoid_copying_the_body(spawnfn: |v: proc():Send|) {
     let (tx, rx) = channel::<uint>();
 
     let x = ~1;
@@ -470,7 +470,7 @@ fn test_child_doesnt_ref_parent() {
     // (well, it would if the constant were 8000+ - I lowered it to be more
     // valgrind-friendly. try this at home, instead..!)
     static generations: uint = 16;
-    fn child_no(x: uint) -> proc:Send() {
+    fn child_no(x: uint) -> proc():Send {
         return proc() {
             if x < generations {
                 task().spawn(child_no(x+1));
index 6fb8981b681c3c1dfbcbb60ef98b821425afd332..82119ad21b990b1708397b27cd09711aee639dd0 100644 (file)
@@ -39,7 +39,7 @@ pub trait Finally<T> {
     fn finally(&self, dtor: ||) -> T;
 }
 
-impl<'a,T> Finally<T> for 'a || -> T {
+impl<'a,T> Finally<T> for ||: 'a -> T {
     fn finally(&self, dtor: ||) -> T {
         try_finally(&mut (), (),
                     |_, _| (*self)(),
@@ -101,7 +101,7 @@ pub fn try_finally<T,U,R>(mutate: &mut T,
 
 struct Finallyalizer<'a,A> {
     mutate: &'a mut A,
-    dtor: 'a |&mut A|
+    dtor: |&mut A|: 'a
 }
 
 #[unsafe_destructor]
index ddbf650e64a97b29f5e3e6304c0306fe2b627420..f660d7ae97a99d38859b913e2367f05d38f72660 100644 (file)
@@ -28,7 +28,7 @@
 The executing thread has no access to a task pointer and will be using
 a normal large stack.
 */
-pub fn run_in_bare_thread(f: proc:Send()) {
+pub fn run_in_bare_thread(f: proc():Send) {
     use rt::thread::Thread;
     Thread::start(f).join()
 }
index 30416b2824136da751e6ec39d46f82bc60ab5513..3c5cdfcf94ec43762e97bf6990158b34ca060e98 100644 (file)
@@ -1574,6 +1574,7 @@ fn test_clone_from() {
         assert_eq!(v, three)
     }
 
+    #[test]
     fn test_grow_fn() {
         let mut v = Vec::from_slice([0u, 1]);
         v.grow_fn(3, |i| i);
index cfe942afc129b1231ce43b294cf930f91490e63d..ac4150a67e0ee037f16ed1913887a0e8808a790e 100644 (file)
@@ -34,7 +34,7 @@ pub struct Future<A> {
 }
 
 enum FutureState<A> {
-    Pending(proc:Send() -> A),
+    Pending(proc():Send -> A),
     Evaluating,
     Forced(A)
 }
@@ -90,7 +90,7 @@ pub fn from_value(val: A) -> Future<A> {
         Future {state: Forced(val)}
     }
 
-    pub fn from_fn(f: proc:Send() -> A) -> Future<A> {
+    pub fn from_fn(f: proc():Send -> A) -> Future<A> {
         /*!
          * Create a future from a function.
          *
@@ -117,7 +117,7 @@ pub fn from_receiver(rx: Receiver<A>) -> Future<A> {
         })
     }
 
-    pub fn spawn(blk: proc:Send() -> A) -> Future<A> {
+    pub fn spawn(blk: proc():Send -> A) -> Future<A> {
         /*!
          * Create a future from a unique closure.
          *
index fc249996882dfcf8757e93529bb13a106c45113d..75e5d19b2e22d072eecbe312b488a6244fd83c53 100644 (file)
@@ -16,7 +16,7 @@
 use std::task;
 
 enum Msg<T> {
-    Execute(proc:Send(&T)),
+    Execute(proc(&T):Send),
     Quit
 }
 
@@ -41,7 +41,7 @@ impl<T> TaskPool<T> {
     /// returns a function which, given the index of the task, should return
     /// local data to be kept around in that task.
     pub fn new(n_tasks: uint,
-               init_fn_factory: || -> proc:Send(uint) -> T)
+               init_fn_factory: || -> proc(uint):Send -> T)
                -> TaskPool<T> {
         assert!(n_tasks >= 1);
 
@@ -73,7 +73,7 @@ pub fn new(n_tasks: uint,
 
     /// Executes the function `f` on a task in the pool. The function
     /// receives a reference to the local data returned by the `init_fn`.
-    pub fn execute(&mut self, f: proc:Send(&T)) {
+    pub fn execute(&mut self, f: proc(&T):Send) {
         self.channels.get(self.next_index).send(Execute(f));
         self.next_index += 1;
         if self.next_index == self.channels.len() { self.next_index = 0; }
@@ -82,8 +82,8 @@ pub fn execute(&mut self, f: proc:Send(&T)) {
 
 #[test]
 fn test_task_pool() {
-    let f: || -> proc:Send(uint) -> uint = || {
-        let g: proc:Send(uint) -> uint = proc(i) i;
+    let f: || -> proc(uint):Send -> uint = || {
+        let g: proc(uint):Send -> uint = proc(i) i;
         g
     };
     let mut pool = TaskPool::new(4, f);
index 631489a65b2309093d09fdb1cd0166006692ec86..ec9c02ac82a7317de602bebee26b8caea7353f89 100644 (file)
@@ -613,7 +613,7 @@ pub trait EachViewItem {
 }
 
 struct EachViewItemData<'a> {
-    callback: 'a |&ast::ViewItem| -> bool,
+    callback: |&ast::ViewItem|: 'a -> bool,
 }
 
 impl<'a> Visitor<()> for EachViewItemData<'a> {
index 0d851647b3de1d45936bd340b54ad94e904575dd..1dcb753624d83a63d28bada06e69d3faf8dbf0ac 100644 (file)
@@ -303,7 +303,7 @@ pub enum SubstructureFields<'a> {
 all the fields of all the structures, see above for details.
 */
 pub type CombineSubstructureFunc<'a> =
-    'a |&mut ExtCtxt, Span, &Substructure| -> @Expr;
+    |&mut ExtCtxt, Span, &Substructure|: 'a -> @Expr;
 
 /**
 Deal with non-matching enum variants, the arguments are a list
@@ -311,10 +311,10 @@ pub enum SubstructureFields<'a> {
 [variant fields]), and a list of the nonself args of the type
 */
 pub type EnumNonMatchFunc<'a> =
-    'a |&mut ExtCtxt,
+    |&mut ExtCtxt,
            Span,
            &[(uint, P<ast::Variant>, Vec<(Span, Option<Ident>, @Expr)> )],
-           &[@Expr]|
+           &[@Expr]|: 'a
            -> @Expr;
 
 
index 62ce0f1e113992385c79e2febd2752fde3715b5b..c8ea0b6aac283208ec3f6a0f475a4cfeecc4a279 100644 (file)
@@ -905,31 +905,23 @@ pub fn parse_proc_type(&mut self) -> Ty_ {
 
         */
 
-        // NOTE: remove after the next stage0 snap
-        let (decl, lifetimes, bounds) = if self.token == token::COLON {
-            let (_, bounds) = self.parse_optional_ty_param_bounds(false);
-            let (decl, lifetimes) = self.parse_ty_fn_decl(false);
-            (decl, lifetimes, bounds)
+        let lifetimes = if self.eat(&token::LT) {
+            let lifetimes = self.parse_lifetimes();
+            self.expect_gt();
+            lifetimes
         } else {
-            let lifetimes = if self.eat(&token::LT) {
-                let lifetimes = self.parse_lifetimes();
-                self.expect_gt();
-                lifetimes
-            } else {
-                Vec::new()
-            };
-
-            let (inputs, variadic) = self.parse_fn_args(false, false);
-            let (_, bounds) = self.parse_optional_ty_param_bounds(false);
-            let (ret_style, ret_ty) = self.parse_ret_ty();
-            let decl = P(FnDecl {
-                inputs: inputs,
-                output: ret_ty,
-                cf: ret_style,
-                variadic: variadic
-            });
-            (decl, lifetimes, bounds)
+            Vec::new()
         };
+
+        let (inputs, variadic) = self.parse_fn_args(false, false);
+        let (_, bounds) = self.parse_optional_ty_param_bounds(false);
+        let (ret_style, ret_ty) = self.parse_ret_ty();
+        let decl = P(FnDecl {
+            inputs: inputs,
+            output: ret_ty,
+            cf: ret_style,
+            variadic: variadic
+        });
         TyClosure(@ClosureTy {
             sigil: OwnedSigil,
             region: None,
@@ -957,8 +949,6 @@ pub fn parse_ty_closure(&mut self) -> Ty_ {
 
         */
 
-        // NOTE: remove 'let region' after a stage0 snap
-        let region = self.parse_opt_lifetime();
         let purity = self.parse_unsafety();
         let onceness = if self.eat_keyword(keywords::Once) {Once} else {Many};
 
@@ -982,10 +972,7 @@ pub fn parse_ty_closure(&mut self) -> Ty_ {
             inputs
         };
 
-        let (new_region, bounds) = self.parse_optional_ty_param_bounds(true);
-
-        // NOTE: this should be removed after a stage0 snap
-        let region = new_region.or(region);
+        let (region, bounds) = self.parse_optional_ty_param_bounds(true);
 
         let (return_style, output) = self.parse_ret_ty();
         let decl = P(FnDecl {
@@ -1246,9 +1233,7 @@ pub fn parse_ty(&mut self, _: bool) -> P<Ty> {
         } else if self.token_is_closure_keyword() ||
                 self.token == token::BINOP(token::OR) ||
                 self.token == token::OROR ||
-                self.token == token::LT ||
-                // NOTE: remove this clause after a stage0 snap
-                Parser::token_is_lifetime(&self.token) {
+                self.token == token::LT {
             // CLOSURE
             //
             // FIXME(pcwalton): Eventually `token::LT` will not unambiguously
index 622375d8a6c88957cdef8f5934f4b5b4cae14d72..5c74715fd2969df00348a384800ef577942bc5ce 100644 (file)
@@ -123,7 +123,7 @@ pub enum TestFn {
     StaticTestFn(fn()),
     StaticBenchFn(fn(&mut BenchHarness)),
     StaticMetricFn(proc(&mut MetricMap)),
-    DynTestFn(proc:Send()),
+    DynTestFn(proc():Send),
     DynMetricFn(proc(&mut MetricMap)),
     DynBenchFn(~TDynBenchFn)
 }
@@ -948,7 +948,7 @@ pub fn run_test(force_ignore: bool,
     #[allow(deprecated_owned_vector)]
     fn run_test_inner(desc: TestDesc,
                       monitor_ch: Sender<MonitorMsg>,
-                      testfn: proc:Send()) {
+                      testfn: proc():Send) {
         spawn(proc() {
             let (tx, rx) = channel();
             let mut reader = ChanReader::new(rx);
index af1958127f97488b699e01a1a2b4c25ab02d4abb..748ca378e4d53ca0f5517b05b134d847bf98c926 100644 (file)
@@ -394,14 +394,14 @@ fn all_fresh(&self, cat: &str, map: &WorkMap) -> bool {
     pub fn exec<'a, T:Send +
         Encodable<json::Encoder<'a>, io::IoError> +
         Decodable<json::Decoder, json::Error>>(
-            &'a self, blk: proc:Send(&mut Exec) -> T) -> T {
+            &'a self, blk: proc(&mut Exec):Send -> T) -> T {
         self.exec_work(blk).unwrap()
     }
 
     fn exec_work<'a, T:Send +
         Encodable<json::Encoder<'a>, io::IoError> +
         Decodable<json::Decoder, json::Error>>( // FIXME(#5121)
-            &'a self, blk: proc:Send(&mut Exec) -> T) -> Work<'a, T> {
+            &'a self, blk: proc(&mut Exec):Send -> T) -> Work<'a, T> {
         let mut bo = Some(blk);
 
         debug!("exec_work: looking up {} and {:?}", self.fn_name,
index 83a8e7bb9658dbbc8b1e76dfb0f523b6e40f8738..0e9f6d80369da4a60e54531de21b1358918493fd 100644 (file)
@@ -1,3 +1,11 @@
+S 2014-04-07 c7fac44
+  freebsd-x86_64 3c01e2a52a1487c360a8e075df0d4fd412d84fe9
+  linux-i386 145f83ec557db77160a207aa2a17e2db8e254b84
+  linux-x86_64 647d2922311a497280d49e91e4946a271d44a232
+  macos-i386 fa19ebca45f83e224911bad13475e40d531e6515
+  macos-x86_64 c0b4df5eed015c527a2a23ca3f2755a44782f61d
+  winnt-i386 e93af6e5ce88e1220f8b4b4cce14436af0b4279a
+
 S 2014-04-03 e7fe207
   freebsd-x86_64 6d40f547d13896ab9d9dd4a4fdf2e72be553b01b
   linux-i386 875a8f6956f7d703f7206db91ca2a9b67c244cf8
index 28437c4585d84ef2ec444ba6a3b2692fe614e172..96cb6c3273aaff84f966dfd369a833d6d081c79b 100644 (file)
@@ -13,7 +13,7 @@
 // part of issue-6919.rs
 
 struct C<'a> {
-    pub k: 'a ||,
+    pub k: ||: 'a,
 }
 
 fn no_op() { }
index e5898b33e7785305cbe929256dd8a0f3884d14ea..951354d964d9f43cfea1963dbd1baf5e00fb0145 100644 (file)
@@ -9,11 +9,11 @@
 // except according to those terms.
 
 struct X {
-    field: 'static ||:Send,
+    field: ||:'static + Send,
 }
 
-fn foo(blk: 'static ||:) -> X {
-    return X { field: blk }; //~ ERROR expected bounds `Send` but found no bounds
+fn foo(blk: ||:'static) -> X {
+    return X { field: blk }; //~ ERROR expected bounds `'static+Send`
 }
 
 fn main() {
index 8e4aa799d1fb93f63e15fd47ee4ffd008577fab0..08ff575f63bfbfd2a862325e6a9bc8f2ffb3a095 100644 (file)
@@ -10,7 +10,7 @@
 
 fn id<T>(t: T) -> T { t }
 
-fn f<'r, T>(v: &'r T) -> 'r || -> T {
+fn f<'r, T>(v: &'r T) -> ||: 'r -> T {
     id(|| *v) //~ ERROR cannot infer
 }
 
index 952a528b427ba09815a950fe58931f862d66b779..026327a358a46c90843eee929a9249b9d17f4289 100644 (file)
@@ -10,7 +10,7 @@
 
 fn foopy() {}
 
-static f: 'static || = foopy; //~ ERROR found extern fn
+static f: ||: 'static = foopy; //~ ERROR found extern fn
 
 fn main () {
     f();
index 51687fffd1150aece3de8a17722204e5bef73f8e..8fe9694b0cb46b57b2c195401bf0e08b2135b22c 100644 (file)
@@ -14,8 +14,8 @@ fn foo(_x: @uint) {}
 
 fn main() {
     let x = @3u;
-    let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
-    let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
-    let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
+    let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send`
+    let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send`
+    let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send`
     let _: proc() = proc() foo(x);
 }
index 03b9b7ba78f4da01731222b60588feadf7158744..e9053b46bbbf17ce3a32ff0c361719e5c6ebe80a 100644 (file)
@@ -16,7 +16,7 @@ struct R<'a> {
     // This struct is needed to create the
     // otherwise infinite type of a fn that
     // accepts itself as argument:
-    c: 'a |&R, bool|
+    c: |&R, bool|: 'a
 }
 
 fn innocent_looking_victim() {
index e4d2c801070b9ee93a293d95fc30834d5d0c38e6..0875212b7dee35b296368a01e300c33d623ef85b 100644 (file)
@@ -13,13 +13,13 @@ fn is_freeze<T: Share>() {}
 fn is_static<T: 'static>() {}
 
 fn main() {
-    is_send::<proc:()>();
+    is_send::<proc()>();
     //~^ ERROR: instantiating a type parameter with an incompatible type
 
-    is_freeze::<proc:()>();
+    is_freeze::<proc()>();
     //~^ ERROR: instantiating a type parameter with an incompatible type
 
-    is_static::<proc:()>();
+    is_static::<proc()>();
     //~^ ERROR: instantiating a type parameter with an incompatible type
 }
 
index ec51f2dc2124434d7161a8975bce842e1b162796..e9ef23ebe09e839186857c98f0725b87e95fa677 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn env<'a>(_: &'a uint, blk: |p: 'a |||) {
+fn env<'a>(_: &'a uint, blk: |p: ||: 'a|) {
     // Test that the closure here cannot be assigned
     // the lifetime `'a`, which outlives the current
     // block.
@@ -21,7 +21,7 @@ fn env<'a>(_: &'a uint, blk: |p: 'a |||) {
     blk(|| *statep = 1); //~ ERROR cannot infer
 }
 
-fn no_env_no_for<'a>(_: &'a uint, blk: |p: 'a |||) {
+fn no_env_no_for<'a>(_: &'a uint, blk: |p: |||: 'a) {
     // Test that a closure with no free variables CAN
     // outlive the block in which it is created.
     //
index 68920065d1967597eec36b09a94d5557e6e328af..285e11fa9a2e1ee40e4b425ca0f41c33b095b240 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn wants_static_fn(_x: 'static ||) {}
+fn wants_static_fn(_x: ||: 'static) {}
 
 fn main() {
     let i = 3;
index ad6d1b2742d10c0a564b12e6cbeef1d71009c776..4c883656d61a5d4e8b7b70e39c25632360c325b8 100644 (file)
@@ -9,15 +9,15 @@
 // except according to those terms.
 
 struct parameterized1<'a> {
-    g: 'a ||
+    g: ||: 'a
 }
 
 struct not_parameterized1 {
-    g: 'static ||
+    g: ||: 'static
 }
 
 struct not_parameterized2 {
-    g: 'static ||
+    g: ||: 'static
 }
 
 fn take1(p: parameterized1) -> parameterized1 { p }
index ae1cbcf3e68745004fd393a42965fa0ba1314ef4..53d013c0e6b8cc7f3924f4a2cc711419a26621b6 100644 (file)
@@ -11,7 +11,7 @@
 #![feature(managed_boxes)]
 
 struct invariant<'a> {
-    f: 'static |x: &mut &'a int|
+    f: |x: &mut &'a int|: 'static
 }
 
 fn to_same_lifetime<'r>(bi: invariant<'r>) {
index 096d8912f8b84cebeded962d8b626a8c83f1e698..edab5b219911e82fd1713ae385792318188339a5 100644 (file)
@@ -11,7 +11,7 @@
 #![feature(managed_boxes)]
 
 struct invariant<'a> {
-    f: 'static || -> &mut &'a int
+    f: ||: 'static -> &mut &'a int
 }
 
 fn to_same_lifetime<'r>(bi: invariant<'r>) {
index 6596a1d8c2384032b0a8dd88f6db2b7e6b962847..86f98d5cc3515b4de3cd7ebf8b04b2c13ee62865 100644 (file)
@@ -14,12 +14,12 @@ struct direct<'a> {
 
 struct indirect1 {
     // Here the lifetime parameter of direct is bound by the fn()
-    g: 'static |direct|
+    g: |direct|: 'static
 }
 
 struct indirect2<'a> {
     // But here it is set to 'a
-    g: 'static |direct<'a>|
+    g: |direct<'a>|: 'static
 }
 
 fn take_direct(p: direct) -> direct { p } //~ ERROR mismatched types
index f80e5616bd5554f4fca5ab4749eb4fbad95116f9..7ffc6a75cff8ca9ac9d5a8b48a3d5fecf355f45b 100644 (file)
@@ -9,10 +9,10 @@
 // except according to those terms.
 
 struct closure_box<'a> {
-    cl: 'a ||
+    cl: ||: 'a
 }
 
-fn box_it<'r>(x: 'r ||) -> closure_box<'r> {
+fn box_it<'r>(x: ||: 'r) -> closure_box<'r> {
     closure_box {cl: x}
 }
 
index 8279119a09caa2d6b3aa305b773b70ccbc7c4d74..c02d3f0e07630edd64ef550b7b4d9ccb0f187837 100644 (file)
@@ -26,7 +26,7 @@ struct WindowCallbacks<'a> {
     pos_callback: Option<WindowPosCallback<'a>>,
 }
 
-pub type WindowPosCallback<'a> = 'a |&Window, i32, i32|;
+pub type WindowPosCallback<'a> = |&Window, i32, i32|: 'a;
 
 fn main() {
     let x = WindowCallbacks { pos_callback: None };
index 4a6f37c91b788148ec87f9470d8febfde82df1ab..da4210b9fa8ccbc94b8609ccb3d4f6c921274627 100644 (file)
@@ -18,7 +18,7 @@ fn failfn() {
 
 fn main() {
     let y = ~0;
-    let x: @proc:Send() = @(proc() {
+    let x: @proc():Send = @(proc() {
         println!("{:?}", y.clone());
     });
     failfn();
index ee570fa2e950def1c5790290732744010c9cfc01..f544d474c4fe783dbe2059692e9d642e2fabc3f7 100644 (file)
@@ -16,7 +16,7 @@ fn main() {
     let cheese = ~"roquefort";
     let carrots = @~"crunchy";
 
-    let result: 'static |@~str, |~str|| = (|tasties, macerate| {
+    let result: |@~str, |~str||: 'static = (|tasties, macerate| {
         macerate((*tasties).clone());
     });
     result(carrots, |food| {
index 4f3db3a5f77f996f4b7140f5fc6c81abb8106763..038c0418ecb4cf660cbfb40f7b8dce13c921b760 100644 (file)
@@ -18,7 +18,7 @@ struct Pair {
 pub fn main() {
     let z = ~Pair { a : 10, b : 12};
 
-    let f: proc:Send() = proc() {
+    let f: proc():Send = proc() {
         assert_eq!(z.a, 10);
         assert_eq!(z.b, 12);
     };
index 798808a157277013fd505ceb486fec14906ff570..983cd00f39cb8f1339d7e152528e93542966283a 100644 (file)
@@ -61,7 +61,7 @@ fn bar<'b>() {
     foo::<proc<'a>(int, f32, &'a int):'static + Share -> &'a int>();
 
     // issue #11209
-    let _: 'b ||; // for comparison
+    let _: ||: 'b; // for comparison
     let _: <'a> ||;
 
     let _: Option<||:'b>;
@@ -69,7 +69,7 @@ fn bar<'b>() {
     let _: Option< <'a>||>;
 
     // issue #11210
-    let _: 'static ||;
+    let _: ||: 'static;
 }
 
 pub fn main() {
index f3ffed7dc7bc3b78f05937d407b54d6d6ae68c29..3aaa480d776c23845ab8b86a26c5630ff0e56d30 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 pub fn main() {
-    let early_error: 'static |&str| -> ! = |_msg| { fail!() };
+    let early_error: |&str|: 'static -> ! = |_msg| { fail!() };
 }
index d04717e380be5cf50b179ddbcd0b884027d31f23..c8735e79e502c296429ddf5290ec692f556f0cc9 100644 (file)
 
 static generations: uint = 1024+256+128+49;
 
-fn spawn(f: proc:Send()) {
+fn spawn(f: proc():Send) {
     let mut t = task::task();
     t.opts.stack_size = Some(32 * 1024);
     t.spawn(f);
 }
 
-fn child_no(x: uint) -> proc:Send() {
+fn child_no(x: uint) -> proc():Send {
     proc() {
         if x < generations {
             spawn(child_no(x+1));
index 1f1de9ddb9ba14f03614588b18cbc122b15c7fca..95bbf77024c8fa178d21ac1aaa834956595044f2 100644 (file)
@@ -11,7 +11,7 @@
 use std::task;
 
 type RingBuffer = Vec<f64> ;
-type SamplesFn = proc:Send(samples: &RingBuffer);
+type SamplesFn = proc(samples: &RingBuffer):Send;
 
 enum Msg
 {
index b72ef59075ce228738cec7a31f8dd2218ca71ce7..ec26dc0b3ed360d1c482b768308abebc50eef92b 100644 (file)
 
 struct A { a: ~int }
 
-fn foo() -> 'static || -> int {
+fn foo() -> ||: 'static -> int {
     let k = ~22;
     let _u = A {a: k.clone()};
-    let result: 'static || -> int = || 22;
+    let result: ||: 'static -> int = || 22;
     result
 }
 
index 900e266584bd31bf1f0d0330c3a5b93e4d66e61d..c103e087363967585a2743666f833e652864236c 100644 (file)
@@ -17,18 +17,18 @@ fn is_static<T: 'static>() {}
 
 pub fn main() {
     foo::<proc()>();
-    foo::<proc:()>();
-    foo::<proc:Send()>();
-    foo::<proc:Send + Share()>();
-    foo::<proc:'static + Send + Share()>();
+    foo::<proc()>();
+    foo::<proc():Send>();
+    foo::<proc():Send + Share>();
+    foo::<proc():'static + Send + Share>();
 
-    is_send::<proc:Send()>();
-    is_freeze::<proc:Share()>();
-    is_static::<proc:'static()>();
+    is_send::<proc():Send>();
+    is_freeze::<proc():Share>();
+    is_static::<proc():'static>();
 
 
     let a = 3;
-    bar::<proc:()>(proc() {
+    bar::<proc():>(proc() {
         let b = &a;
         println!("{}", *b);
     });
index ac3dd80c383bbbfc33f2049beaba5503d5832462..a62c1ec33146bfa0a56910e3db0f41074c9e1b86 100644 (file)
@@ -18,7 +18,7 @@ fn test05_start(f: proc(int)) {
 
 fn test05() {
     let three = ~3;
-    let fn_to_send: proc:Send(int) = proc(n) {
+    let fn_to_send: proc(int):Send = proc(n) {
         println!("{}", *three + n); // will copy x into the closure
         assert_eq!(*three, 3);
     };
index d11e879b494a753a94dac806384f28596f31b137..437d6faea3854cea53a480763648168522fc7eee 100644 (file)
@@ -35,7 +35,7 @@ fn test_tempdir() {
 
 fn test_rm_tempdir() {
     let (tx, rx) = channel();
-    let f: proc:Send() = proc() {
+    let f: proc():Send = proc() {
         let tmp = TempDir::new("test_rm_tempdir").unwrap();
         tx.send(tmp.path().clone());
         fail!("fail to unwind past `tmp`");
@@ -46,7 +46,7 @@ fn test_rm_tempdir() {
 
     let tmp = TempDir::new("test_rm_tempdir").unwrap();
     let path = tmp.path().clone();
-    let f: proc:Send() = proc() {
+    let f: proc():Send = proc() {
         let _tmp = tmp;
         fail!("fail to unwind past `tmp`");
     };
index 78fa7520f33fa082902b07a4517fe355a2d9cc49..3c164d3e2dab599ff3fcd707007ded864aea223e 100644 (file)
@@ -19,10 +19,10 @@ enum maybe_pointy {
 
 struct Pointy {
     a : maybe_pointy,
-    d : proc:Send() -> uint,
+    d : proc():Send -> uint,
 }
 
-fn make_uniq_closure<A:Send>(a: A) -> proc:Send() -> uint {
+fn make_uniq_closure<A:Send>(a: A) -> proc():Send -> uint {
     proc() { &a as *A as uint }
 }
 
index aa048a239dbf3171a6ed262ff1da7e7ebea3a250..6c273199c6f7c71e359e5e0193a9341c587d8f32 100644 (file)
@@ -20,7 +20,7 @@ enum maybe_pointy {
 struct Pointy {
     a : maybe_pointy,
     c : ~int,
-    d : proc:Send()->(),
+    d : proc():Send->(),
 }
 
 fn empty_pointy() -> @RefCell<Pointy> {