2018-02-21 20:38:10 -06:00
|
|
|
error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-48276.rs:11:5
|
2018-02-21 20:38:10 -06:00
|
|
|
|
|
2018-03-05 03:20:04 -06:00
|
|
|
LL | fn from(a: A) -> Self;
|
2018-02-21 20:38:10 -06:00
|
|
|
| ---------------------- trait method declared without `&self`
|
|
|
|
...
|
2018-03-05 03:20:04 -06:00
|
|
|
LL | fn from(self: &'a Self) -> &'b str {
|
2018-02-21 20:38:10 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
|
|
|
|
|
|
|
|
error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-48276.rs:20:5
|
2018-02-21 20:38:10 -06:00
|
|
|
|
|
2018-03-05 03:20:04 -06:00
|
|
|
LL | fn from(&self) -> B {
|
2018-02-21 20:38:10 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ `&self` used in impl
|
|
|
|
|
|
|
|
|
= note: `from` from trait: `fn(T) -> Self`
|
|
|
|
|
|
|
|
error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-48276.rs:27:5
|
2018-02-21 20:38:10 -06:00
|
|
|
|
|
2018-03-05 03:20:04 -06:00
|
|
|
LL | fn from(&self) -> &'static str {
|
2018-02-21 20:38:10 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
|
|
|
|
|
|
|
|
|
= note: `from` from trait: `fn(T) -> Self`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0185`.
|