blob: 9e2dd8ea84ac9f01777452c23ae7ecd9da0e1906 [file]
error[E0201]: duplicate definitions with name `foo`:
--> $DIR/duplicate-definition-inside-trait-impl.rs:18:5
|
LL | fn foo(&self) -> u32 { 0 }
| -------------------------- item in trait
...
LL | reuse to_reuse::foo { self }
| ---------------------------- previous definition here
LL | reuse Trait::foo;
| ^^^^^^^^^^^^^^^^^ duplicate definition
error[E0061]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/duplicate-definition-inside-trait-impl.rs:18:18
|
LL | reuse Trait::foo;
| ^^^ argument #1 of type `&_` is missing
|
note: method defined here
--> $DIR/duplicate-definition-inside-trait-impl.rs:4:8
|
LL | fn foo(&self) -> u32 { 0 }
| ^^^ -----
help: provide the argument
|
LL | reuse Trait::foo(/* value */);
| +++++++++++++
error[E0308]: mismatched types
--> $DIR/duplicate-definition-inside-trait-impl.rs:18:18
|
LL | reuse Trait::foo;
| ^^^- help: consider using a semicolon here: `;`
| |
| expected `()`, found `u32`
| expected `()` because of default return type
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0061, E0201, E0308.
For more information about an error, try `rustc --explain E0061`.