Skip to content

Commit 363b09c

Browse files
committed
---
yaml --- r: 32341 b: refs/heads/dist-snap c: f393100 h: refs/heads/master i: 32339: a4254b4 v: v3
1 parent ee002d9 commit 363b09c

File tree

15 files changed

+45
-47
lines changed

15 files changed

+45
-47
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: cb0eb66672c20404cc87850db98fe00ff94da403
10+
refs/heads/dist-snap: f393100b7ce86e0c1201f003c2d69fb9ea742db1
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libcore/at_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pure fn from_elem<T: copy>(n_elts: uint, t: T) -> @[T] {
133133
}
134134

135135
#[cfg(notest)]
136-
impl<T: copy> @[T]: add<&[const T],@[T]> {
136+
impl<T: copy> @[T]: Add<&[const T],@[T]> {
137137
#[inline(always)]
138138
pure fn add(rhs: &[const T]) -> @[T] {
139139
append(self, rhs)

branches/dist-snap/src/libcore/core.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,28 @@ export ToStr;
4444
// The compiler has special knowlege of these so we must not duplicate them
4545
// when compiling for testing
4646
#[cfg(notest)]
47-
import ops::{const, copy, send, owned};
47+
import ops::{Const, Copy, Send, Owned};
4848
#[cfg(notest)]
49-
import ops::{add, sub, mul, div, modulo, neg, bitand, bitor, bitxor};
49+
import ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor};
5050
#[cfg(notest)]
51-
import ops::{shl, shr, index};
51+
import ops::{Shl, Shr, Index};
5252

5353
#[cfg(notest)]
54-
export const, copy, send, owned;
54+
export Const, Copy, Send, Owned;
5555
#[cfg(notest)]
56-
export add, sub, mul, div, modulo, neg, bitand, bitor, bitxor;
56+
export Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor;
5757
#[cfg(notest)]
58-
export shl, shr, index;
58+
export Shl, Shr, Index;
5959

6060
#[cfg(test)]
6161
use coreops(name = "core", vers = "0.4");
6262

6363
#[cfg(test)]
64-
import coreops::ops::{const, copy, send, owned};
64+
import coreops::ops::{Const, Copy, Send, Owned};
6565
#[cfg(test)]
66-
import coreops::ops::{add, sub, mul, div, modulo, neg, bitand, bitor, bitxor};
66+
import coreops::ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor};
6767
#[cfg(test)]
68-
import coreops::ops::{shl, shr, index};
68+
import coreops::ops::{Shl, Shr, Index};
6969

7070

7171
// Export the log levels as global constants. Higher levels mean

branches/dist-snap/src/libcore/dvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ impl<A: copy> DVec<A> {
327327
}
328328
}
329329

330-
impl<A:copy> DVec<A>: index<uint,A> {
330+
impl<A:copy> DVec<A>: Index<uint,A> {
331331
pure fn index(&&idx: uint) -> A {
332332
self.get_elt(idx)
333333
}

branches/dist-snap/src/libcore/ops.rs

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,98 @@
11
// Core operators and kinds.
22

3-
#[allow(non_camel_case_types)];
4-
53
#[cfg(notest)]
64
#[lang="const"]
7-
trait const {
5+
trait Const {
86
// Empty.
97
}
108

119
#[cfg(notest)]
1210
#[lang="copy"]
13-
trait copy {
11+
trait Copy {
1412
// Empty.
1513
}
1614

1715
#[cfg(notest)]
1816
#[lang="send"]
19-
trait send {
17+
trait Send {
2018
// Empty.
2119
}
2220

2321
#[cfg(notest)]
2422
#[lang="owned"]
25-
trait owned {
23+
trait Owned {
2624
// Empty.
2725
}
2826

2927
#[cfg(notest)]
3028
#[lang="add"]
31-
trait add<RHS,Result> {
29+
trait Add<RHS,Result> {
3230
pure fn add(rhs: RHS) -> Result;
3331
}
3432

3533
#[cfg(notest)]
3634
#[lang="sub"]
37-
trait sub<RHS,Result> {
35+
trait Sub<RHS,Result> {
3836
pure fn sub(rhs: RHS) -> Result;
3937
}
4038

4139
#[cfg(notest)]
4240
#[lang="mul"]
43-
trait mul<RHS,Result> {
41+
trait Mul<RHS,Result> {
4442
pure fn mul(rhs: RHS) -> Result;
4543
}
4644

4745
#[cfg(notest)]
4846
#[lang="div"]
49-
trait div<RHS,Result> {
47+
trait Div<RHS,Result> {
5048
pure fn div(rhs: RHS) -> Result;
5149
}
5250

5351
#[cfg(notest)]
5452
#[lang="modulo"]
55-
trait modulo<RHS,Result> {
53+
trait Modulo<RHS,Result> {
5654
pure fn modulo(rhs: RHS) -> Result;
5755
}
5856

5957
#[cfg(notest)]
6058
#[lang="neg"]
61-
trait neg<Result> {
59+
trait Neg<Result> {
6260
pure fn neg() -> Result;
6361
}
6462

6563
#[cfg(notest)]
6664
#[lang="bitand"]
67-
trait bitand<RHS,Result> {
65+
trait BitAnd<RHS,Result> {
6866
pure fn bitand(rhs: RHS) -> Result;
6967
}
7068

7169
#[cfg(notest)]
7270
#[lang="bitor"]
73-
trait bitor<RHS,Result> {
71+
trait BitOr<RHS,Result> {
7472
pure fn bitor(rhs: RHS) -> Result;
7573
}
7674

7775
#[cfg(notest)]
7876
#[lang="bitxor"]
79-
trait bitxor<RHS,Result> {
77+
trait BitXor<RHS,Result> {
8078
pure fn bitxor(rhs: RHS) -> Result;
8179
}
8280

8381
#[cfg(notest)]
8482
#[lang="shl"]
85-
trait shl<RHS,Result> {
83+
trait Shl<RHS,Result> {
8684
pure fn shl(rhs: RHS) -> Result;
8785
}
8886

8987
#[cfg(notest)]
9088
#[lang="shr"]
91-
trait shr<RHS,Result> {
89+
trait Shr<RHS,Result> {
9290
pure fn shr(rhs: RHS) -> Result;
9391
}
9492

9593
#[cfg(notest)]
9694
#[lang="index"]
97-
trait index<Index,Result> {
95+
trait Index<Index,Result> {
9896
pure fn index(index: Index) -> Result;
9997
}
10098

branches/dist-snap/src/libcore/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,7 @@ impl ~str: UniqueStr {
20652065
}
20662066

20672067
#[cfg(notest)]
2068-
impl ~str: add<&str,~str> {
2068+
impl ~str: Add<&str,~str> {
20692069
#[inline(always)]
20702070
pure fn add(rhs: &str) -> ~str {
20712071
append(copy self, rhs)

branches/dist-snap/src/libcore/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,14 +1480,14 @@ impl<T: Ord> @[T]: Ord {
14801480
}
14811481

14821482
#[cfg(notest)]
1483-
impl<T: copy> ~[T]: add<&[const T],~[T]> {
1483+
impl<T: copy> ~[T]: Add<&[const T],~[T]> {
14841484
#[inline(always)]
14851485
pure fn add(rhs: &[const T]) -> ~[T] {
14861486
append(copy self, rhs)
14871487
}
14881488
}
14891489

1490-
impl<T: copy> ~[mut T]: add<&[const T],~[mut T]> {
1490+
impl<T: copy> ~[mut T]: Add<&[const T],~[mut T]> {
14911491
#[inline(always)]
14921492
pure fn add(rhs: &[const T]) -> ~[mut T] {
14931493
append_mut(self, rhs)

branches/dist-snap/src/libstd/bitv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ pure fn land(w0: uint, w1: uint) -> uint { return w0 & w1; }
469469

470470
pure fn right(_w0: uint, w1: uint) -> uint { return w1; }
471471

472-
impl Bitv: ops::index<uint,bool> {
472+
impl Bitv: ops::Index<uint,bool> {
473473
pure fn index(&&i: uint) -> bool {
474474
self.get(i)
475475
}

branches/dist-snap/src/libstd/ebml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type Doc = {data: @~[u8], start: uint, end: uint};
4141

4242
type TaggedDoc = {tag: uint, doc: Doc};
4343

44-
impl Doc: ops::index<uint,Doc> {
44+
impl Doc: ops::Index<uint,Doc> {
4545
pure fn index(&&tag: uint) -> Doc {
4646
unchecked {
4747
get_doc(self, tag)

branches/dist-snap/src/libstd/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ mod chained {
367367
}
368368
}
369369

370-
impl<K: copy, V: copy> t<K, V>: ops::index<K, V> {
370+
impl<K: copy, V: copy> t<K, V>: ops::Index<K, V> {
371371
pure fn index(&&k: K) -> V {
372372
unchecked {
373373
self.get(k)

branches/dist-snap/src/libstd/smallintmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl<V: copy> smallintmap<V>: map::map<uint, V> {
134134
}
135135
}
136136

137-
impl<V: copy> smallintmap<V>: ops::index<uint, V> {
137+
impl<V: copy> smallintmap<V>: ops::Index<uint, V> {
138138
pure fn index(&&key: uint) -> V {
139139
unchecked {
140140
get(self, key)

branches/dist-snap/src/rustc/middle/ty.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,23 +1605,23 @@ fn remove_copyable(k: kind) -> kind {
16051605
k - kind_(KIND_MASK_COPY | KIND_MASK_DEFAULT_MODE)
16061606
}
16071607
1608-
impl kind: ops::bitand<kind,kind> {
1608+
impl kind: ops::BitAnd<kind,kind> {
16091609
pure fn bitand(other: kind) -> kind {
16101610
unchecked {
16111611
lower_kind(self, other)
16121612
}
16131613
}
16141614
}
16151615
1616-
impl kind: ops::bitor<kind,kind> {
1616+
impl kind: ops::BitOr<kind,kind> {
16171617
pure fn bitor(other: kind) -> kind {
16181618
unchecked {
16191619
raise_kind(self, other)
16201620
}
16211621
}
16221622
}
16231623
1624-
impl kind: ops::sub<kind,kind> {
1624+
impl kind: ops::Sub<kind,kind> {
16251625
pure fn sub(other: kind) -> kind {
16261626
unchecked {
16271627
kind_(*self & !*other)

branches/dist-snap/src/test/bench/shootout-mandelbrot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct cmplx {
2121
im: f64;
2222
}
2323

24-
impl cmplx : ops::mul<cmplx,cmplx> {
24+
impl cmplx : ops::Mul<cmplx,cmplx> {
2525
pure fn mul(x: cmplx) -> cmplx {
2626
cmplx {
2727
re: self.re*x.re - self.im*x.im,
@@ -30,7 +30,7 @@ impl cmplx : ops::mul<cmplx,cmplx> {
3030
}
3131
}
3232

33-
impl cmplx : ops::add<cmplx,cmplx> {
33+
impl cmplx : ops::Add<cmplx,cmplx> {
3434
pure fn add(x: cmplx) -> cmplx {
3535
cmplx {
3636
re: self.re + x.re,

branches/dist-snap/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ struct Point {
33
y: int;
44
}
55

6-
impl Point : ops::add<int,int> {
6+
impl Point : ops::Add<int,int> {
77
pure fn add(&&z: int) -> int {
88
self.x + self.y + z
99
}

branches/dist-snap/src/test/run-pass/operator-overloading.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ struct Point {
33
y: int;
44
}
55

6-
impl Point : ops::add<Point,Point> {
6+
impl Point : ops::Add<Point,Point> {
77
pure fn add(other: Point) -> Point {
88
Point {x: self.x + other.x, y: self.y + other.y}
99
}
1010
}
1111

12-
impl Point : ops::sub<Point,Point> {
12+
impl Point : ops::Sub<Point,Point> {
1313
pure fn sub(other: Point) -> Point {
1414
Point {x: self.x - other.x, y: self.y - other.y}
1515
}
1616
}
1717

18-
impl Point : ops::neg<Point> {
18+
impl Point : ops::Neg<Point> {
1919
pure fn neg() -> Point {
2020
Point {x: -self.x, y: -self.y}
2121
}
2222
}
2323

24-
impl Point : ops::index<bool,int> {
24+
impl Point : ops::Index<bool,int> {
2525
pure fn index(&&x: bool) -> int {
2626
if x { self.x } else { self.y }
2727
}

0 commit comments

Comments
 (0)