rust/tests/ui/error-codes/E0283.stderr

38 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
2021-01-15 13:33:51 +00:00
--> $DIR/E0283.rs:30:21
2018-02-08 03:35:35 +00:00
|
LL | fn create() -> u32;
2023-10-19 16:06:43 +00:00
| ------------------- `Coroutine::create` defined here
...
2023-10-19 16:06:43 +00:00
LL | let cont: u32 = Coroutine::create();
| ^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait
|
help: use a fully-qualified path to a specific available implementation
2019-10-30 00:28:39 +00:00
|
2023-10-19 16:06:43 +00:00
LL | let cont: u32 = </* self type */ as Coroutine>::create();
| +++++++++++++++++++ +
2018-02-08 03:35:35 +00:00
2021-01-15 13:33:51 +00:00
error[E0283]: type annotations needed
--> $DIR/E0283.rs:35:24
|
LL | let bar = foo_impl.into() * 1u32;
2022-02-14 12:25:26 +00:00
| ^^^^
2021-01-15 13:33:51 +00:00
|
note: multiple `impl`s satisfying `Impl: Into<_>` found
--> $DIR/E0283.rs:17:1
|
LL | impl Into<u32> for Impl {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: and another `impl` found in the `core` crate:
- impl<T, U> Into<U> for T
where U: From<T>;
2022-02-14 12:25:26 +00:00
help: try using a fully qualified path to specify the expected types
|
2022-02-14 12:25:26 +00:00
LL | let bar = <Impl as Into<T>>::into(foo_impl) * 1u32;
| ++++++++++++++++++++++++ ~
2021-01-15 13:33:51 +00:00
error: aborting due to 2 previous errors
2018-02-08 03:35:35 +00:00
Some errors have detailed explanations: E0283, E0790.
For more information about an error, try `rustc --explain E0283`.