Move 'overlapping_inherent_impls' test to ui

This commit is contained in:
topecongiro 2017-04-04 21:00:56 +09:00
parent 018c5c9298
commit 09f42ee333
2 changed files with 32 additions and 3 deletions

View file

@ -16,7 +16,7 @@
struct Foo;
impl Foo {
fn id() {} //~ ERROR duplicate definitions
fn id() {}
}
impl Foo {
@ -26,7 +26,7 @@ impl Foo {
struct Bar<T>(T);
impl<T> Bar<T> {
fn bar(&self) {} //~ ERROR duplicate definitions
fn bar(&self) {}
}
impl Bar<u32> {
@ -36,7 +36,7 @@ impl Bar<u32> {
struct Baz<T>(T);
impl<T: Copy> Baz<T> {
fn baz(&self) {} //~ ERROR duplicate definitions
fn baz(&self) {}
}
impl<T> Baz<Vec<T>> {

View file

@ -0,0 +1,29 @@
error[E0592]: duplicate definitions with name `id`
--> $DIR/overlapping_inherent_impls.rs:19:5
|
19 | fn id() {}
| ^^^^^^^^^^ duplicate definitions for `id`
...
23 | fn id() {}
| ---------- other definition for `id`
error[E0592]: duplicate definitions with name `bar`
--> $DIR/overlapping_inherent_impls.rs:29:5
|
29 | fn bar(&self) {}
| ^^^^^^^^^^^^^^^^ duplicate definitions for `bar`
...
33 | fn bar(&self) {}
| ---------------- other definition for `bar`
error[E0592]: duplicate definitions with name `baz`
--> $DIR/overlapping_inherent_impls.rs:39:5
|
39 | fn baz(&self) {}
| ^^^^^^^^^^^^^^^^ duplicate definitions for `baz`
...
43 | fn baz(&self) {}
| ---------------- other definition for `baz`
error: aborting due to 3 previous errors