|
| 1 | +error[E0599]: no method named `my_debug` found for opaque type `impl Debug` in the current scope |
| 2 | + --> $DIR/call_method_on_inherent_impl_ref.rs:20:11 |
| 3 | + | |
| 4 | +LL | fn my_debug(&self); |
| 5 | + | -------- the method is available for `&impl Debug` here |
| 6 | +... |
| 7 | +LL | x.my_debug(); |
| 8 | + | ^^^^^^^^ method not found in `impl Debug` |
| 9 | + | |
| 10 | + = help: items from traits can only be used if the trait is implemented and in scope |
| 11 | +note: `MyDebug` defines an item `my_debug`, perhaps you need to implement it |
| 12 | + --> $DIR/call_method_on_inherent_impl_ref.rs:4:1 |
| 13 | + | |
| 14 | +LL | trait MyDebug { |
| 15 | + | ^^^^^^^^^^^^^ |
| 16 | + |
| 17 | +error[E0391]: cycle detected when computing type of opaque `my_foo::{opaque#0}` |
| 18 | + --> $DIR/call_method_on_inherent_impl_ref.rs:15:16 |
| 19 | + | |
| 20 | +LL | fn my_foo() -> impl std::fmt::Debug { |
| 21 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 22 | + | |
| 23 | +note: ...which requires type-checking `my_foo`... |
| 24 | + --> $DIR/call_method_on_inherent_impl_ref.rs:20:9 |
| 25 | + | |
| 26 | +LL | x.my_debug(); |
| 27 | + | ^ |
| 28 | + = note: ...which requires evaluating trait selection obligation `my_foo::{opaque#0}: core::marker::Unpin`... |
| 29 | + = note: ...which again requires computing type of opaque `my_foo::{opaque#0}`, completing the cycle |
| 30 | +note: cycle used when computing type of `my_foo::{opaque#0}` |
| 31 | + --> $DIR/call_method_on_inherent_impl_ref.rs:15:16 |
| 32 | + | |
| 33 | +LL | fn my_foo() -> impl std::fmt::Debug { |
| 34 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 35 | + = 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 |
| 36 | + |
| 37 | +error: aborting due to 2 previous errors |
| 38 | + |
| 39 | +Some errors have detailed explanations: E0391, E0599. |
| 40 | +For more information about an error, try `rustc --explain E0391`. |
0 commit comments