File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
2
2
--> $DIR/issue-48276.rs:21:5
3
3
|
4
- 15 | fn from(a: A) -> Self;
4
+ LL | fn from(a: A) -> Self;
5
5
| ---------------------- trait method declared without `&self`
6
6
...
7
- 21 | fn from(self: &'a Self) -> &'b str {
7
+ LL | fn from(self: &'a Self) -> &'b str {
8
8
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
9
9
10
10
error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
11
11
--> $DIR/issue-48276.rs:30:5
12
12
|
13
- 30 | fn from(&self) -> B {
13
+ LL | fn from(&self) -> B {
14
14
| ^^^^^^^^^^^^^^^^^^^ `&self` used in impl
15
15
|
16
16
= note: `from` from trait: `fn(T) -> Self`
17
17
18
18
error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
19
19
--> $DIR/issue-48276.rs:37:5
20
20
|
21
- 37 | fn from(&self) -> &'static str {
21
+ LL | fn from(&self) -> &'static str {
22
22
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
23
23
|
24
24
= note: `from` from trait: `fn(T) -> Self`
25
25
26
26
error: aborting due to 3 previous errors
27
27
28
+ If you want more information on this error, try using "rustc --explain E0185"
You can’t perform that action at this time.
0 commit comments