]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-48276.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-48276.stderr
1 error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
2   --> $DIR/issue-48276.rs:21:5
3    |
4 LL |     fn from(a: A) -> Self;
5    |     ---------------------- trait method declared without `&self`
6 ...
7 LL |     fn from(self: &'a Self) -> &'b str {
8    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
9
10 error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
11   --> $DIR/issue-48276.rs:30:5
12    |
13 LL |     fn from(&self) -> B {
14    |     ^^^^^^^^^^^^^^^^^^^ `&self` used in impl
15    |
16    = note: `from` from trait: `fn(T) -> Self`
17
18 error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
19   --> $DIR/issue-48276.rs:37:5
20    |
21 LL |     fn from(&self) -> &'static str {
22    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
23    |
24    = note: `from` from trait: `fn(T) -> Self`
25
26 error: aborting due to 3 previous errors
27
28 For more information about this error, try `rustc --explain E0185`.