Skip to content

Commit c517081

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 171847 b: refs/heads/beta c: ec11f66 h: refs/heads/master i: 171845: e0d78ee 171843: 493ac0b 171839: c75f3b7 v: v3
1 parent 378e531 commit c517081

18 files changed

+29
-29
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: c98814b1243ddde1f41fbc86815397b3091f2215
34+
refs/heads/beta: ec11f66dbf68c7d0a958b28e520f547c885a3fde
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/beta/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn innocent_looking_victim() {
2929
} else {
3030
match x {
3131
Some(ref msg) => {
32-
f.c.call_mut((f, true));
32+
(f.c)(f, true);
3333
//~^ ERROR: cannot borrow `*f` as mutable more than once at a time
3434
println!("{}", msg);
3535
},

branches/beta/src/test/compile-fail/unboxed-closures-type-mismatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ use std::ops::FnMut;
1414

1515
pub fn main() {
1616
let mut f = |&mut: x: int, y: int| -> int { x + y };
17-
let z = f.call_mut((1u, 2)); //~ ERROR type mismatch
17+
let z = f(1u, 2); //~ ERROR type mismatch
1818
println!("{}", z);
1919
}

branches/beta/src/test/compile-fail/unboxed-closures-vtable-mismatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use std::ops::FnMut;
1414

1515
fn call_it<F:FnMut<(int,int),int>>(y: int, mut f: F) -> int {
16-
f.call_mut((2, y))
16+
f(2, y)
1717
}
1818

1919
pub fn main() {

branches/beta/src/test/run-pass/hashmap-memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
pub fn map(filename: String, mut emit: map_reduce::putter) {
21-
emit.call_mut((filename, "1".to_string(),));
21+
emit(filename, "1".to_string());
2222
}
2323

2424
mod map_reduce {

branches/beta/src/test/run-pass/issue-16668.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ impl<'a, I, O: 'a> Parser<'a, I, O> {
2020
fn compose<K: 'a>(mut self, mut rhs: Parser<'a, O, K>) -> Parser<'a, I, K> {
2121
Parser {
2222
parse: box move |&mut: x: I| {
23-
match (*self.parse).call_mut((x,)) {
24-
Ok(r) => (*rhs.parse).call_mut((r,)),
23+
match (self.parse)(x) {
24+
Ok(r) => (rhs.parse)(r),
2525
Err(e) => Err(e)
2626
}
2727
}

branches/beta/src/test/run-pass/issue-3424.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn tester()
2727
};
2828

2929
let path = path::Path::new("blah");
30-
assert!(loader.call_mut((&path,)).is_ok());
30+
assert!(loader(&path).is_ok());
3131
}
3232

3333
pub fn main() {}

branches/beta/src/test/run-pass/overloaded-calls-simple.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn main() {
5050
x: 3,
5151
y: 3,
5252
};
53-
let ans = s.call_mut((3,));
53+
let ans = s(3);
5454

5555
assert_eq!(ans, 27);
5656
let s = S2 {
@@ -64,7 +64,7 @@ fn main() {
6464
x: 3,
6565
y: 3,
6666
};
67-
let ans = s.call_once((3, 1));
67+
let ans = s(3, 1);
6868
assert_eq!(ans, 27);
6969
}
7070

branches/beta/src/test/run-pass/trait-bounds-in-arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ struct Goldfyshe {
4242
}
4343

4444
impl Pet for Catte {
45-
fn name(&self, mut blk: Box<FnMut(&str)>) { blk.call_mut((self.name.as_slice(),)) }
45+
fn name(&self, mut blk: Box<FnMut(&str)>) { blk(self.name.as_slice()) }
4646
fn num_legs(&self) -> uint { 4 }
4747
fn of_good_pedigree(&self) -> bool { self.num_whiskers >= 4 }
4848
}
4949
impl Pet for Dogge {
50-
fn name(&self, mut blk: Box<FnMut(&str)>) { blk.call_mut((self.name.as_slice(),)) }
50+
fn name(&self, mut blk: Box<FnMut(&str)>) { blk(self.name.as_slice()) }
5151
fn num_legs(&self) -> uint { 4 }
5252
fn of_good_pedigree(&self) -> bool {
5353
self.bark_decibels < 70 || self.tricks_known > 20
5454
}
5555
}
5656
impl Pet for Goldfyshe {
57-
fn name(&self, mut blk: Box<FnMut(&str)>) { blk.call_mut((self.name.as_slice(),)) }
57+
fn name(&self, mut blk: Box<FnMut(&str)>) { blk(self.name.as_slice()) }
5858
fn num_legs(&self) -> uint { 0 }
5959
fn of_good_pedigree(&self) -> bool { self.swim_speed >= 500 }
6060
}

branches/beta/src/test/run-pass/unboxed-closures-boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::ops::FnMut;
1919

2020
pub fn main() {
2121
let mut adder = make_adder(3);
22-
let z = adder.call_mut((2,));
22+
let z = adder(2);
2323
println!("{}", z);
2424
assert_eq!(z, 5);
2525
}

branches/beta/src/test/run-pass/unboxed-closures-extern-fn.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ use std::ops::{Fn,FnMut,FnOnce};
1818
fn square(x: int) -> int { x * x }
1919

2020
fn call_it<F:Fn(int)->int>(f: &F, x: int) -> int {
21-
f.call((x,))
21+
f(x)
2222
}
2323

2424
fn call_it_mut<F:FnMut(int)->int>(f: &mut F, x: int) -> int {
25-
f.call_mut((x,))
25+
f(x)
2626
}
2727

2828
fn call_it_once<F:FnOnce(int)->int>(f: F, x: int) -> int {
29-
f.call_once((x,))
29+
f(x)
3030
}
3131

3232
fn main() {

branches/beta/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ impl Fn<(int,),int> for S {
2525
}
2626

2727
fn call_it<F:Fn(int)->int>(f: &F, x: int) -> int {
28-
f.call((x,))
28+
f(x)
2929
}
3030

3131
fn call_it_mut<F:FnMut(int)->int>(f: &mut F, x: int) -> int {
32-
f.call_mut((x,))
32+
f(x)
3333
}
3434

3535
fn call_it_once<F:FnOnce(int)->int>(f: F, x: int) -> int {
36-
f.call_once((x,))
36+
f(x)
3737
}
3838

3939
fn main() {

branches/beta/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ impl FnMut<(int,),int> for S {
2525
}
2626

2727
fn call_it_mut<F:FnMut(int)->int>(f: &mut F, x: int) -> int {
28-
f.call_mut((x,))
28+
f(x)
2929
}
3030

3131
fn call_it_once<F:FnOnce(int)->int>(f: F, x: int) -> int {
32-
f.call_once((x,))
32+
f(x)
3333
}
3434

3535
fn main() {

branches/beta/src/test/run-pass/unboxed-closures-generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use std::ops::FnMut;
1414

1515
fn call_it<F:FnMut<(int,int),int>>(y: int, mut f: F) -> int {
16-
f.call_mut((2, y))
16+
f(2, y)
1717
}
1818

1919
pub fn main() {

branches/beta/src/test/run-pass/unboxed-closures-manual-impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ impl FnMut<(int,),int> for S {
2222
}
2323

2424
fn call_it<F:FnMut(int)->int>(mut f: F, x: int) -> int {
25-
f.call_mut((x,)) + 3
25+
f(x) + 3
2626
}
2727

2828
fn call_box(f: &mut FnMut(int) -> int, x: int) -> int {
29-
f.call_mut((x,)) + 3
29+
f(x) + 3
3030
}
3131

3232
fn main() {

branches/beta/src/test/run-pass/unboxed-closures-prelude.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ fn main() {
1717
task.call((0i, ));
1818

1919
let mut task: Box<FnMut(int) -> int> = box |&mut: x| x;
20-
task.call_mut((0i, ));
20+
task(0i);
2121

2222
call(|:x| x, 22);
2323
}
2424

2525
fn call<F:FnOnce(int) -> int>(f: F, x: int) -> int {
26-
f.call_once((x,))
26+
f(x)
2727
}
2828

branches/beta/src/test/run-pass/unboxed-closures-simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ use std::ops::FnMut;
1414

1515
pub fn main() {
1616
let mut f = |&mut: x: int, y: int| -> int { x + y };
17-
let z = f.call_mut((1, 2));
17+
let z = f(1, 2);
1818
assert_eq!(z, 3);
1919
}

branches/beta/src/test/run-pass/unboxed-closures-static-call-fn-once.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212

1313
fn main() {
1414
let onetime = |: x| x;
15-
onetime.call_once((0i,));
15+
onetime(0i);
1616
}
1717

0 commit comments

Comments
 (0)