Skip to content

Commit 09f42ee

Browse files
committed
Move 'overlapping_inherent_impls' test to ui
1 parent 018c5c9 commit 09f42ee

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

src/test/compile-fail/inherent-overlap.rs renamed to src/test/ui/codemap_tests/overlapping_inherent_impls.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
struct Foo;
1717

1818
impl Foo {
19-
fn id() {} //~ ERROR duplicate definitions
19+
fn id() {}
2020
}
2121

2222
impl Foo {
@@ -26,7 +26,7 @@ impl Foo {
2626
struct Bar<T>(T);
2727

2828
impl<T> Bar<T> {
29-
fn bar(&self) {} //~ ERROR duplicate definitions
29+
fn bar(&self) {}
3030
}
3131

3232
impl Bar<u32> {
@@ -36,7 +36,7 @@ impl Bar<u32> {
3636
struct Baz<T>(T);
3737

3838
impl<T: Copy> Baz<T> {
39-
fn baz(&self) {} //~ ERROR duplicate definitions
39+
fn baz(&self) {}
4040
}
4141

4242
impl<T> Baz<Vec<T>> {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
error[E0592]: duplicate definitions with name `id`
2+
--> $DIR/overlapping_inherent_impls.rs:19:5
3+
|
4+
19 | fn id() {}
5+
| ^^^^^^^^^^ duplicate definitions for `id`
6+
...
7+
23 | fn id() {}
8+
| ---------- other definition for `id`
9+
10+
error[E0592]: duplicate definitions with name `bar`
11+
--> $DIR/overlapping_inherent_impls.rs:29:5
12+
|
13+
29 | fn bar(&self) {}
14+
| ^^^^^^^^^^^^^^^^ duplicate definitions for `bar`
15+
...
16+
33 | fn bar(&self) {}
17+
| ---------------- other definition for `bar`
18+
19+
error[E0592]: duplicate definitions with name `baz`
20+
--> $DIR/overlapping_inherent_impls.rs:39:5
21+
|
22+
39 | fn baz(&self) {}
23+
| ^^^^^^^^^^^^^^^^ duplicate definitions for `baz`
24+
...
25+
43 | fn baz(&self) {}
26+
| ---------------- other definition for `baz`
27+
28+
error: aborting due to 3 previous errors
29+

0 commit comments

Comments
 (0)