fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
988 B28 linesraw
1error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
2  --> $DIR/issue-48276.rs:11:5
3   |
4LL |     fn from(a: A) -> Self;
5   |     ---------------------- trait method declared without `&self`
6...
7LL |     fn from(self: &'a Self) -> &'b str {
8   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
9
10error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
11  --> $DIR/issue-48276.rs:20:5
12   |
13LL |     fn from(&self) -> B {
14   |     ^^^^^^^^^^^^^^^^^^^ `&self` used in impl
15   |
16   = note: `from` from trait: `fn(T) -> Self`
17
18error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
19  --> $DIR/issue-48276.rs:27:5
20   |
21LL |     fn from(&self) -> &'static str {
22   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
23   |
24   = note: `from` from trait: `fn(T) -> Self`
25
26error: aborting due to 3 previous errors
27
28For more information about this error, try `rustc --explain E0185`.