remove leftover annotations
This commit is contained in:
parent
cc8a5a0db7
commit
7ad2e22e4e
5 changed files with 6 additions and 6 deletions
|
@ -3752,9 +3752,9 @@ An example of creating and calling a closure:
|
||||||
```rust
|
```rust
|
||||||
let captured_var = 10;
|
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);
|
println!("captured_var={}, arg={}", captured_var, arg);
|
||||||
arg // Note lack of semicolon after 'arg'
|
arg // Note lack of semicolon after 'arg'
|
||||||
};
|
};
|
||||||
|
|
|
@ -257,7 +257,7 @@ pub fn eval_const_expr_partial<'tcx>(tcx: &ty::ctxt<'tcx>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(Ok(const_int(a)), Ok(const_int(b))) => {
|
(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) {
|
let int_ty = match ty::expr_ty_opt(tcx, e).map(|ty| &ty.sty) {
|
||||||
Some(&ty::ty_int(int_ty)) => int_ty,
|
Some(&ty::ty_int(int_ty)) => int_ty,
|
||||||
_ => return false
|
_ => return false
|
||||||
|
|
|
@ -45,7 +45,7 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'tcx>(
|
||||||
scope: region::CodeExtent,
|
scope: region::CodeExtent,
|
||||||
depth: uint)
|
depth: uint)
|
||||||
{
|
{
|
||||||
let origin = |&:| infer::SubregionOrigin::SafeDestructor(span);
|
let origin = || infer::SubregionOrigin::SafeDestructor(span);
|
||||||
let mut walker = ty_root.walk();
|
let mut walker = ty_root.walk();
|
||||||
let opt_phantom_data_def_id = rcx.tcx().lang_items.phantom_data();
|
let opt_phantom_data_def_id = rcx.tcx().lang_items.phantom_data();
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,7 @@ impl Process {
|
||||||
// file descriptor. Otherwise, the first file descriptor opened
|
// file descriptor. Otherwise, the first file descriptor opened
|
||||||
// up in the child would be numbered as one of the stdio file
|
// up in the child would be numbered as one of the stdio file
|
||||||
// descriptors, which is likely to wreak havoc.
|
// 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 {
|
let src = match src {
|
||||||
None => {
|
None => {
|
||||||
let flags = if dst == libc::STDIN_FILENO {
|
let flags = if dst == libc::STDIN_FILENO {
|
||||||
|
|
|
@ -160,7 +160,7 @@ impl Process {
|
||||||
// Similarly to unix, we don't actually leave holes for the stdio file
|
// Similarly to unix, we don't actually leave holes for the stdio file
|
||||||
// descriptors, but rather open up /dev/null equivalents. These
|
// descriptors, but rather open up /dev/null equivalents. These
|
||||||
// equivalents are drawn from libuv's windows process spawning.
|
// 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| {
|
is_stdin: bool| {
|
||||||
match *fd {
|
match *fd {
|
||||||
None => {
|
None => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue