Skip to content

Commit f453883

Browse files
committed
---
yaml --- r: 156658 b: refs/heads/try c: e09fc03 h: refs/heads/master v: v3
1 parent 920d78a commit f453883

File tree

6 files changed

+20
-13
lines changed

6 files changed

+20
-13
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: a34b8dec697014f15e725215e17ea8d956c0ab1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d44ea720fa9dfe062ef06d0eb49a58d4e7e92344
5-
refs/heads/try: 7f8ca53669e71481201892e37ec57939e5f1ec85
5+
refs/heads/try: e09fc0370188eff0bd3e6f27f72ba4de0d1a6c24
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,24 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// Test the mechanism for warning about possible missing `self` declarations.
12+
1113
trait CtxtFn {
1214
fn f8(self, uint) -> uint;
13-
fn f9(uint) -> uint; //~ NOTE candidate #
15+
fn f9(uint) -> uint; //~ NOTE candidate
1416
}
1517

1618
trait OtherTrait {
17-
fn f9(uint) -> uint; //~ NOTE candidate #
19+
fn f9(uint) -> uint; //~ NOTE candidate
1820
}
1921

20-
trait UnusedTrait { // This should never show up as a candidate
21-
fn f9(uint) -> uint;
22+
// Note: this trait is not implemented, but we can't really tell
23+
// whether or not an impl would match anyhow without a self
24+
// declaration to match against, so we wind up printing it as a
25+
// candidate. This seems not unreasonable -- perhaps the user meant to
26+
// implement it, after all.
27+
trait UnusedTrait {
28+
fn f9(uint) -> uint; //~ NOTE candidate
2229
}
2330

2431
impl CtxtFn for uint {
@@ -40,13 +47,13 @@ impl OtherTrait for uint {
4047
struct MyInt(int);
4148

4249
impl MyInt {
43-
fn fff(i: int) -> int { //~ NOTE candidate #1 is `MyInt::fff`
50+
fn fff(i: int) -> int { //~ NOTE candidate
4451
i
4552
}
4653
}
4754

4855
trait ManyImplTrait {
49-
fn is_str() -> bool { //~ NOTE candidate #1 is
56+
fn is_str() -> bool { //~ NOTE candidate
5057
false
5158
}
5259
}

branches/try/src/test/compile-fail/selftype-traittype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait add {
1414
}
1515

1616
fn do_add(x: Box<add+'static>, y: Box<add+'static>) -> Box<add+'static> {
17-
x.plus(y) //~ ERROR cannot call a method whose type contains a self-type through an object
17+
x.plus(y) //~ ERROR E0038
1818
}
1919

2020
fn main() {}

branches/try/src/test/compile-fail/unique-pinned-nocopy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ impl Drop for r {
1919

2020
fn main() {
2121
let i = box r { b: true };
22-
let _j = i.clone(); //~ ERROR not implemented
22+
let _j = i.clone(); //~ ERROR not implement
2323
println!("{}", i);
2424
}

branches/try/src/test/compile-fail/unique-vec-res.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ fn main() {
3535
let r1 = vec!(box r { i: i1 });
3636
let r2 = vec!(box r { i: i2 });
3737
f(r1.clone(), r2.clone());
38-
//~^ ERROR the trait `core::clone::Clone` is not implemented
39-
//~^^ ERROR the trait `core::clone::Clone` is not implemented
38+
//~^ ERROR does not implement any method in scope named `clone`
39+
//~^^ ERROR does not implement any method in scope named `clone`
4040
println!("{}", (r2, i1.get()));
4141
println!("{}", (r1, i2.get()));
4242
}

branches/try/src/test/compile-fail/vec-res-add.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#[deriving(Show)]
1112
struct r {
1213
i:int
1314
}
@@ -23,7 +24,6 @@ fn main() {
2324
let i = vec!(r(0));
2425
let j = vec!(r(1));
2526
let k = i + j;
26-
//~^ ERROR not implemented
27+
//~^ ERROR binary operation `+` cannot be applied to type
2728
println!("{}", j);
28-
//~^ ERROR not implemented
2929
}

0 commit comments

Comments
 (0)