|
1 |
| -error[E0599]: no method named `foo` found for struct `Bar<impl Sized>` in the current scope |
2 |
| - --> $DIR/method-resolution3.rs:19:11 |
| 1 | +error[E0034]: multiple applicable items in scope |
| 2 | + --> $DIR/method-resolution3.rs:18:11 |
3 | 3 | |
|
4 |
| -LL | struct Bar<T>(T); |
5 |
| - | ------------- method `foo` not found for this struct |
6 |
| -... |
7 | 4 | LL | x.foo();
|
8 |
| - | ^^^ method not found in `Bar<impl Sized>` |
| 5 | + | ^^^ multiple `foo` found |
9 | 6 | |
|
10 |
| - = note: the method was found for |
11 |
| - - `Bar<i32>` |
12 |
| - - `Bar<u32>` |
13 |
| - |
14 |
| -error[E0391]: cycle detected when computing type of opaque `foo::{opaque#0}` |
15 |
| - --> $DIR/method-resolution3.rs:15:24 |
16 |
| - | |
17 |
| -LL | fn foo(x: bool) -> Bar<impl Sized> { |
18 |
| - | ^^^^^^^^^^ |
| 7 | +note: candidate #1 is defined in an impl for the type `Bar<i32>` |
| 8 | + --> $DIR/method-resolution3.rs:12:5 |
19 | 9 | |
|
20 |
| -note: ...which requires type-checking `foo`... |
21 |
| - --> $DIR/method-resolution3.rs:19:9 |
22 |
| - | |
23 |
| -LL | x.foo(); |
24 |
| - | ^ |
25 |
| - = note: ...which requires evaluating trait selection obligation `Bar<foo::{opaque#0}>: core::marker::Unpin`... |
26 |
| - = note: ...which again requires computing type of opaque `foo::{opaque#0}`, completing the cycle |
27 |
| -note: cycle used when computing type of `foo::{opaque#0}` |
28 |
| - --> $DIR/method-resolution3.rs:15:24 |
| 10 | +LL | fn foo(self) {} |
| 11 | + | ^^^^^^^^^^^^ |
| 12 | +note: candidate #2 is defined in an impl for the type `Bar<u32>` |
| 13 | + --> $DIR/method-resolution3.rs:8:5 |
29 | 14 | |
|
30 |
| -LL | fn foo(x: bool) -> Bar<impl Sized> { |
31 |
| - | ^^^^^^^^^^ |
32 |
| - = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| 15 | +LL | fn foo(self) {} |
| 16 | + | ^^^^^^^^^^^^ |
33 | 17 |
|
34 |
| -error: aborting due to 2 previous errors |
| 18 | +error: aborting due to 1 previous error |
35 | 19 |
|
36 |
| -Some errors have detailed explanations: E0391, E0599. |
37 |
| -For more information about an error, try `rustc --explain E0391`. |
| 20 | +For more information about this error, try `rustc --explain E0034`. |
0 commit comments