]> git.lizzy.rs Git - rust.git/commitdiff
remove leftover annotations
authorJorge Aparicio <japaricious@gmail.com>
Sat, 28 Feb 2015 02:21:09 +0000 (21:21 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sat, 28 Feb 2015 04:35:07 +0000 (23:35 -0500)
src/doc/reference.md
src/librustc/middle/const_eval.rs
src/librustc_typeck/check/dropck.rs
src/libstd/sys/unix/process2.rs
src/libstd/sys/windows/process2.rs

index 781b40be768c86f03b05ce809ce1a9c7aead5145..b5ad7cc22f3279d1f3f64db7782b2dda048bb12d 100644 (file)
@@ -3752,9 +3752,9 @@ An example of creating and calling a closure:
 ```rust
 let captured_var = 10;
 
-let closure_no_args = |&:| println!("captured_var={}", captured_var);
+let closure_no_args = || println!("captured_var={}", captured_var);
 
-let closure_args = |&: arg: i32| -> i32 {
+let closure_args = |arg: i32| -> i32 {
   println!("captured_var={}, arg={}", captured_var, arg);
   arg // Note lack of semicolon after 'arg'
 };
index f793d3ce2fb4522c08aca64f0849c4022d18bf39..0c9f9d2a5301aa2b94caf89aca8fba87f6c10006 100644 (file)
@@ -257,7 +257,7 @@ fn fromb(b: bool) -> Result<const_val, String> { Ok(const_int(b as i64)) }
             }
           }
           (Ok(const_int(a)), Ok(const_int(b))) => {
-            let is_a_min_value = |&:| {
+            let is_a_min_value = || {
                 let int_ty = match ty::expr_ty_opt(tcx, e).map(|ty| &ty.sty) {
                     Some(&ty::ty_int(int_ty)) => int_ty,
                     _ => return false
index ce67369ca9dda132ecfa707b24b6c0ea8d9cc0be..083523f7ba92f97fce223becfadf59dccc1003e7 100644 (file)
@@ -45,7 +45,7 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'tcx>(
     scope: region::CodeExtent,
     depth: uint)
 {
-    let origin = |&:| infer::SubregionOrigin::SafeDestructor(span);
+    let origin = || infer::SubregionOrigin::SafeDestructor(span);
     let mut walker = ty_root.walk();
     let opt_phantom_data_def_id = rcx.tcx().lang_items.phantom_data();
 
index b7a1b002f55983a0048fc742f2a0167a8be32ecc..1b77b4fe75cea7f7cd91ac3c28e65a9a97b8e8e2 100644 (file)
@@ -274,7 +274,7 @@ fn fail(output: &mut AnonPipe) -> ! {
                 // file descriptor. Otherwise, the first file descriptor opened
                 // up in the child would be numbered as one of the stdio file
                 // descriptors, which is likely to wreak havoc.
-                let setup = |&: src: Option<AnonPipe>, dst: c_int| {
+                let setup = |src: Option<AnonPipe>, dst: c_int| {
                     let src = match src {
                         None => {
                             let flags = if dst == libc::STDIN_FILENO {
index d4c6e85489f5d25d87f82e01791834869ba96fea..8a6a485cbbe0f01d060f53c9767e6592fda8ee6a 100644 (file)
@@ -160,7 +160,7 @@ pub fn spawn(cfg: &Command,
             // Similarly to unix, we don't actually leave holes for the stdio file
             // descriptors, but rather open up /dev/null equivalents. These
             // equivalents are drawn from libuv's windows process spawning.
-            let set_fd = |&: fd: &Option<AnonPipe>, slot: &mut HANDLE,
+            let set_fd = |fd: &Option<AnonPipe>, slot: &mut HANDLE,
                           is_stdin: bool| {
                 match *fd {
                     None => {