Skip to content

Commit c225616

Browse files
committed
---
yaml --- r: 124655 b: refs/heads/try c: 00c70d1 h: refs/heads/master i: 124653: 8c43432 124651: 63caf0d 124647: 82cb5a5 124639: 1c2f4d7 v: v3
1 parent 008e7c9 commit c225616

23 files changed

+32
-32
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f15d6d28396e8700b6c3f2704204a2769e710403
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: fe49cbeb82deaa771dcaa4f512cb9f967beb5996
5+
refs/heads/try: 00c70d1a803e62ccbe2545d5c5522f4dcd6953b9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ impl Clean<Item> for ty::Method {
10031003
};
10041004
let s = match s {
10051005
ty::ByReferenceExplicitSelfCategory(..) => {
1006-
match ty::get(*self.fty.sig.inputs[0]).sty {
1006+
match ty::get(self.fty.sig.inputs[0]).sty {
10071007
ty::ty_rptr(r, mt) => {
10081008
SelfBorrowed(r.clean(), mt.mutbl.clean())
10091009
}

branches/try/src/test/compile-fail/issue-5153.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
// error-pattern: type `&Foo` does not implement any method in scope named `foo`
1212

1313
trait Foo {
14-
fn foo(~self);
14+
fn foo(self: Box<Self>);
1515
}
1616

1717
impl Foo for int {
18-
fn foo(~self) { }
18+
fn foo(self: Box<int>) { }
1919
}
2020

2121
fn main() {

branches/try/src/test/compile-fail/lint-unused-mut-self.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
struct Foo;
1717
impl Foo {
1818
fn foo(mut self) {} //~ ERROR: variable does not need to be mutable
19-
fn bar(mut ~self) {} //~ ERROR: variable does not need to be mutable
19+
fn bar(mut self: Box<Foo>) {} //~ ERROR: variable does not need to be mutable
2020
}
2121

2222
fn main() {}

branches/try/src/test/compile-fail/object-pointer-types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait Foo {
1313
fn borrowed(&self);
1414
fn borrowed_mut(&mut self);
1515

16-
fn owned(~self);
16+
fn owned(self: Box<Self>);
1717
}
1818

1919
fn borrowed_receiver(x: &Foo) {

branches/try/src/test/debuginfo/generic-method-on-generic-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl<T1> Struct<T1> {
134134
arg1
135135
}
136136

137-
fn self_owned<T2>(~self, arg1: int, arg2: T2) -> int {
137+
fn self_owned<T2>(self: Box<Struct<T1>>, arg1: int, arg2: T2) -> int {
138138
zzz(); // #break
139139
arg1
140140
}

branches/try/src/test/debuginfo/method-on-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl Enum {
136136
arg1 + arg2
137137
}
138138

139-
fn self_owned(~self, arg1: int, arg2: int) -> int {
139+
fn self_owned(self: Box<Enum>, arg1: int, arg2: int) -> int {
140140
zzz(); // #break
141141
arg1 + arg2
142142
}

branches/try/src/test/debuginfo/method-on-generic-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl<T> Struct<T> {
134134
arg1 + arg2
135135
}
136136

137-
fn self_owned(~self, arg1: int, arg2: int) -> int {
137+
fn self_owned(self: Box<Struct<T>>, arg1: int, arg2: int) -> int {
138138
zzz(); // #break
139139
arg1 + arg2
140140
}

branches/try/src/test/debuginfo/method-on-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl Struct {
133133
self.x + arg1 + arg2
134134
}
135135

136-
fn self_owned(~self, arg1: int, arg2: int) -> int {
136+
fn self_owned(self: Box<Struct>, arg1: int, arg2: int) -> int {
137137
zzz(); // #break
138138
self.x + arg1 + arg2
139139
}

branches/try/src/test/debuginfo/method-on-trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ struct Struct {
124124
trait Trait {
125125
fn self_by_ref(&self, arg1: int, arg2: int) -> int;
126126
fn self_by_val(self, arg1: int, arg2: int) -> int;
127-
fn self_owned(~self, arg1: int, arg2: int) -> int;
127+
fn self_owned(self: Box<Self>, arg1: int, arg2: int) -> int;
128128
}
129129

130130
impl Trait for Struct {
@@ -139,7 +139,7 @@ impl Trait for Struct {
139139
self.x + arg1 + arg2
140140
}
141141

142-
fn self_owned(~self, arg1: int, arg2: int) -> int {
142+
fn self_owned(self: Box<Struct>, arg1: int, arg2: int) -> int {
143143
zzz(); // #break
144144
self.x + arg1 + arg2
145145
}

branches/try/src/test/debuginfo/method-on-tuple-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl TupleStruct {
131131
arg1 + arg2
132132
}
133133

134-
fn self_owned(~self, arg1: int, arg2: int) -> int {
134+
fn self_owned(self: Box<TupleStruct>, arg1: int, arg2: int) -> int {
135135
zzz(); // #break
136136
arg1 + arg2
137137
}

branches/try/src/test/debuginfo/self-in-default-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ trait Trait {
133133
arg1 + arg2
134134
}
135135

136-
fn self_owned(~self, arg1: int, arg2: int) -> int {
136+
fn self_owned(self: Box<Self>, arg1: int, arg2: int) -> int {
137137
zzz(); // #break
138138
arg1 + arg2
139139
}

branches/try/src/test/debuginfo/self-in-generic-default-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ trait Trait {
134134
arg1
135135
}
136136

137-
fn self_owned<T>(~self, arg1: int, arg2: T) -> int {
137+
fn self_owned<T>(self: Box<Self>, arg1: int, arg2: T) -> int {
138138
zzz(); // #break
139139
arg1
140140
}

branches/try/src/test/run-pass/autoderef-method-on-trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111

1212
trait double {
13-
fn double(~self) -> uint;
13+
fn double(self: Box<Self>) -> uint;
1414
}
1515

1616
impl double for uint {
17-
fn double(~self) -> uint { *self * 2u }
17+
fn double(self: Box<uint>) -> uint { *self * 2u }
1818
}
1919

2020
pub fn main() {

branches/try/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111

1212
trait double {
13-
fn double(~self) -> uint;
13+
fn double(self: Box<Self>) -> uint;
1414
}
1515

1616
impl double for Box<uint> {
17-
fn double(~self) -> uint { **self * 2u }
17+
fn double(self: Box<Box<uint>>) -> uint { **self * 2u }
1818
}
1919

2020
pub fn main() {

branches/try/src/test/run-pass/autoderef-method-twice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// except according to those terms.
1010

1111
trait double {
12-
fn double(~self) -> uint;
12+
fn double(self: Box<Self>) -> uint;
1313
}
1414

1515
impl double for uint {
16-
fn double(~self) -> uint { *self * 2u }
16+
fn double(self: Box<uint>) -> uint { *self * 2u }
1717
}
1818

1919
pub fn main() {

branches/try/src/test/run-pass/autoderef-method.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// except according to those terms.
1010

1111
trait double {
12-
fn double(~self) -> uint;
12+
fn double(self: Box<Self>) -> uint;
1313
}
1414

1515
impl double for uint {
16-
fn double(~self) -> uint { *self * 2u }
16+
fn double(self: Box<uint>) -> uint { *self * 2u }
1717
}
1818

1919
pub fn main() {

branches/try/src/test/run-pass/explicit-self-objects-uniq.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111

1212
trait Foo {
13-
fn f(~self);
13+
fn f(self: Box<Self>);
1414
}
1515

1616
struct S {
1717
x: int
1818
}
1919

2020
impl Foo for S {
21-
fn f(~self) {
21+
fn f(self: Box<S>) {
2222
assert_eq!(self.x, 3);
2323
}
2424
}

branches/try/src/test/run-pass/explicit-self.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn thing(x: A) -> thing {
5757
}
5858

5959
impl thing {
60-
pub fn bar(~self) -> int { self.x.a }
60+
pub fn bar(self: Box<thing>) -> int { self.x.a }
6161
pub fn quux(&self) -> int { self.x.a }
6262
pub fn baz<'a>(&'a self) -> &'a A { &self.x }
6363
pub fn spam(self) -> int { self.x.a }

branches/try/src/test/run-pass/issue-7320.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
trait Foo {
13-
fn foo(~self) { bar(self as Box<Foo>); }
13+
fn foo(self: Box<Self>) { bar(self as Box<Foo>); }
1414
}
1515

1616
fn bar(_b: Box<Foo>) { }

branches/try/src/test/run-pass/objects-owned-object-owned-method.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515

1616
trait FooTrait {
17-
fn foo(~self) -> uint;
17+
fn foo(self: Box<Self>) -> uint;
1818
}
1919

2020
struct BarStruct {
2121
x: uint
2222
}
2323

2424
impl FooTrait for BarStruct {
25-
fn foo(~self) -> uint {
25+
fn foo(self: Box<BarStruct>) -> uint {
2626
self.x
2727
}
2828
}

branches/try/src/test/run-pass/self-in-mut-slot-default-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait Changer {
1919
self
2020
}
2121

22-
fn change_again(mut ~self) -> Box<Self> {
22+
fn change_again(mut self: Box<Self>) -> Box<Self> {
2323
self.set_to(45);
2424
self
2525
}

branches/try/src/test/run-pass/uniq-self-in-mut-slot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ struct X {
1414
}
1515

1616
trait Changer {
17-
fn change(mut ~self) -> Box<Self>;
17+
fn change(mut self: Box<Self>) -> Box<Self>;
1818
}
1919

2020
impl Changer for X {
21-
fn change(mut ~self) -> Box<X> {
21+
fn change(mut self: Box<X>) -> Box<X> {
2222
self.a = 55;
2323
self
2424
}

0 commit comments

Comments
 (0)