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