Skip to content

Commit d03eb2c

Browse files
committed
Fix some of the tests
- removed the inherent impls compile-fail test, because we’ll be supporting them - remove E0308-2 because it’s gonna be supported now (behind a feature gate) - replaced the mismatched method receiver error message with something better, so fixed the tests that that broke
1 parent 9a592e6 commit d03eb2c

File tree

5 files changed

+7
-38
lines changed

5 files changed

+7
-38
lines changed

src/test/compile-fail/E0308-2.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/test/compile-fail/arbitrary-self-types-inherent-impl.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
use std::rc::Rc;
22

33
trait Foo {
4-
fn foo(self: Rc<Box<Self>>); //~ ERROR arbitrary self types are unstable
4+
fn foo(self: Rc<Box<Self>>); //~ ERROR arbitrary `self` types are unstable
55
}
66

77
struct Bar;
88

99
impl Foo for Bar {
10-
fn foo(self: Rc<Box<Self>>) {} //~ ERROR arbitrary self types are unstable
10+
fn foo(self: Rc<Box<Self>>) {} //~ ERROR arbitrary `self` types are unstable
1111
}
1212

1313
impl Bar {
14-
fn bar(self: Box<Rc<Self>>) {} //~ ERROR arbitrary self types are unstable
14+
fn bar(self: Box<Rc<Self>>) {} //~ ERROR arbitrary `self` types are unstable
1515
}
1616

1717
fn main() {}

src/test/compile-fail/issue-26194.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct S(String);
1212

1313
impl S {
1414
fn f(self: *mut S) -> String { self.0 }
15-
//~^ ERROR mismatched method receiver
15+
//~^ ERROR invalid `self` type
1616
}
1717

1818
fn main() { S("".to_owned()).f(); }

src/test/compile-fail/ufcs-explicit-self-bad.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct Foo {
1515
}
1616

1717
impl Foo {
18-
fn foo(self: isize, x: isize) -> isize { //~ ERROR mismatched method receiver
18+
fn foo(self: isize, x: isize) -> isize { //~ ERROR invalid `self` type
1919
self.f + x
2020
}
2121
}
@@ -25,10 +25,10 @@ struct Bar<T> {
2525
}
2626

2727
impl<T> Bar<T> {
28-
fn foo(self: Bar<isize>, x: isize) -> isize { //~ ERROR mismatched method receiver
28+
fn foo(self: Bar<isize>, x: isize) -> isize { //~ ERROR invalid `self` type
2929
x
3030
}
31-
fn bar(self: &Bar<usize>, x: isize) -> isize { //~ ERROR mismatched method receiver
31+
fn bar(self: &Bar<usize>, x: isize) -> isize { //~ ERROR invalid `self` type
3232
x
3333
}
3434
}

0 commit comments

Comments
 (0)