Skip to content

Commit 3eda11a

Browse files
committed
test: Remove pure from the test suite
1 parent fbe22af commit 3eda11a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+153
-158
lines changed

src/test/auxiliary/cci_class_cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub mod kitty {
1818
}
1919

2020
impl ToStr for cat {
21-
pure fn to_str(&self) -> ~str { copy self.name }
21+
fn to_str(&self) -> ~str { copy self.name }
2222
}
2323

2424
priv impl cat {

src/test/auxiliary/crateresolve5-1.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ pub enum e {
2525

2626
pub fn nominal() -> e { e_val }
2727

28-
pub pure fn nominal_eq(e1: e, e2: e) -> bool { true }
28+
pub fn nominal_eq(e1: e, e2: e) -> bool { true }
2929

3030
impl Eq for e {
31-
pure fn eq(&self, other: &e) -> bool { nominal_eq(*self, *other) }
32-
pure fn ne(&self, other: &e) -> bool { !nominal_eq(*self, *other) }
31+
fn eq(&self, other: &e) -> bool { nominal_eq(*self, *other) }
32+
fn ne(&self, other: &e) -> bool { !nominal_eq(*self, *other) }
3333
}
3434

3535
pub fn f() -> int { 10 }

src/test/auxiliary/crateresolve5-2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ pub enum e {
2323
}
2424

2525
impl Eq for e {
26-
pure fn eq(&self, other: &e) -> bool { !nominal_neq(*self, *other) }
27-
pure fn ne(&self, other: &e) -> bool { nominal_neq(*self, *other) }
26+
fn eq(&self, other: &e) -> bool { !nominal_neq(*self, *other) }
27+
fn ne(&self, other: &e) -> bool { nominal_neq(*self, *other) }
2828
}
2929

3030
pub fn nominal() -> e { e_val }
3131

32-
pub pure fn nominal_neq(e1: e, e2: e) -> bool { false }
32+
pub fn nominal_neq(e1: e, e2: e) -> bool { false }
3333

3434
pub fn f() -> int { 20 }

src/test/auxiliary/impl_privacy_xc_2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ pub struct Fish {
77
mod unexported {
88
use super::Fish;
99
impl Eq for Fish {
10-
pure fn eq(&self, _: &Fish) -> bool { true }
11-
pure fn ne(&self, _: &Fish) -> bool { false }
10+
fn eq(&self, _: &Fish) -> bool { true }
11+
fn ne(&self, _: &Fish) -> bool { false }
1212
}
1313
}
1414

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
pub mod num {
22
pub trait Num2 {
3-
pure fn from_int2(n: int) -> Self;
3+
fn from_int2(n: int) -> Self;
44
}
55
}
66

77
pub mod float {
88
impl ::num::Num2 for float {
9-
pure fn from_int2(n: int) -> float { return n as float; }
9+
fn from_int2(n: int) -> float { return n as float; }
1010
}
1111
}

src/test/auxiliary/trait_inheritance_overloading_xc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ pub struct MyInt {
1818
}
1919

2020
impl Add<MyInt, MyInt> for MyInt {
21-
pure fn add(&self, other: &MyInt) -> MyInt { mi(self.val + other.val) }
21+
fn add(&self, other: &MyInt) -> MyInt { mi(self.val + other.val) }
2222
}
2323

2424
impl Sub<MyInt, MyInt> for MyInt {
25-
pure fn sub(&self, other: &MyInt) -> MyInt { mi(self.val - other.val) }
25+
fn sub(&self, other: &MyInt) -> MyInt { mi(self.val - other.val) }
2626
}
2727

2828
impl Mul<MyInt, MyInt> for MyInt {
29-
pure fn mul(&self, other: &MyInt) -> MyInt { mi(self.val * other.val) }
29+
fn mul(&self, other: &MyInt) -> MyInt { mi(self.val * other.val) }
3030
}
3131

3232
impl Eq for MyInt {
33-
pure fn eq(&self, other: &MyInt) -> bool { self.val == other.val }
33+
fn eq(&self, other: &MyInt) -> bool { self.val == other.val }
3434

35-
pure fn ne(&self, other: &MyInt) -> bool { !self.eq(other) }
35+
fn ne(&self, other: &MyInt) -> bool { !self.eq(other) }
3636
}
3737

3838
impl MyNum for MyInt;
3939

40-
pure fn mi(v: int) -> MyInt { MyInt { val: v } }
40+
fn mi(v: int) -> MyInt { MyInt { val: v } }
4141

src/test/bench/shootout-k-nucleotide-pipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
2727
return (xx as float) * 100f / (yy as float);
2828
}
2929

30-
pure fn le_by_val<TT:Copy,UU:Copy + Ord>(kv0: &(TT,UU),
30+
fn le_by_val<TT:Copy,UU:Copy + Ord>(kv0: &(TT,UU),
3131
kv1: &(TT,UU)) -> bool {
3232
let (_, v0) = *kv0;
3333
let (_, v1) = *kv1;
3434
return v0 >= v1;
3535
}
3636

37-
pure fn le_by_key<TT:Copy + Ord,UU:Copy>(kv0: &(TT,UU),
37+
fn le_by_key<TT:Copy + Ord,UU:Copy>(kv0: &(TT,UU),
3838
kv1: &(TT,UU)) -> bool {
3939
let (k0, _) = *kv0;
4040
let (k1, _) = *kv1;

src/test/bench/shootout-mandelbrot.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct cmplx {
3333
}
3434

3535
impl ops::Mul<cmplx,cmplx> for cmplx {
36-
pure fn mul(&self, x: &cmplx) -> cmplx {
36+
fn mul(&self, x: &cmplx) -> cmplx {
3737
cmplx {
3838
re: self.re*(*x).re - self.im*(*x).im,
3939
im: self.re*(*x).im + self.im*(*x).re
@@ -42,7 +42,7 @@ impl ops::Mul<cmplx,cmplx> for cmplx {
4242
}
4343

4444
impl ops::Add<cmplx,cmplx> for cmplx {
45-
pure fn add(&self, x: &cmplx) -> cmplx {
45+
fn add(&self, x: &cmplx) -> cmplx {
4646
cmplx {
4747
re: self.re + (*x).re,
4848
im: self.im + (*x).im
@@ -52,7 +52,7 @@ impl ops::Add<cmplx,cmplx> for cmplx {
5252

5353
struct Line {i: uint, b: ~[u8]}
5454

55-
pure fn cabs(x: cmplx) -> f64
55+
fn cabs(x: cmplx) -> f64
5656
{
5757
x.re*x.re + x.im*x.im
5858
}

src/test/compile-fail/auto-ref-slice-plus-ref.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ fn main() {
2020
}
2121

2222
trait MyIter {
23-
pure fn test_mut(&mut self);
23+
fn test_mut(&mut self);
2424
}
2525

2626
impl MyIter for &'self [int] {
27-
pure fn test_mut(&mut self) { }
27+
fn test_mut(&mut self) { }
2828
}

src/test/compile-fail/borrowck-loan-in-overloaded-op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
struct foo(~uint);
1414

1515
impl Add<foo, foo> for foo {
16-
pure fn add(f: &foo) -> foo {
16+
fn add(f: &foo) -> foo {
1717
foo(~(**self + **(*f)))
1818
}
1919
}

0 commit comments

Comments
 (0)