blob: 6d10693c8933b28a909dfb98a9a16c253be5af2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
error[E0599]: no method named `bar` found for struct `Bar<impl Sized>` in the current scope
--> $DIR/method-resolution.rs:23:11
|
LL | struct Bar<T>(T);
| ------------- method `bar` not found for this struct
...
LL | x.bar();
| ^^^ method not found in `Bar<impl Sized>`
|
= note: the method was found for
- `Bar<u32>`
error[E0391]: cycle detected when computing type of opaque `foo::{opaque#0}`
--> $DIR/method-resolution.rs:19:24
|
LL | fn foo(x: bool) -> Bar<impl Sized> {
| ^^^^^^^^^^
|
note: ...which requires type-checking `foo`...
--> $DIR/method-resolution.rs:23:9
|
LL | x.bar();
| ^
= note: ...which requires evaluating trait selection obligation `Bar<foo::{opaque#0}>: core::marker::Unpin`...
= note: ...which again requires computing type of opaque `foo::{opaque#0}`, completing the cycle
note: cycle used when computing type of `foo::{opaque#0}`
--> $DIR/method-resolution.rs:19:24
|
LL | fn foo(x: bool) -> Bar<impl Sized> {
| ^^^^^^^^^^
= 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
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0391, E0599.
For more information about an error, try `rustc --explain E0391`.
|