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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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 07:33:51 -06:00
--> $DIR/E0283.rs:30:21
2018-02-07 21:35:35 -06:00
|
LL | fn create() -> u32;
| ------------------- `Generator::create` defined here
...
2019-03-09 06:03:44 -06:00
LL | let cont: u32 = Generator::create();
| ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
|
help: use a fully-qualified path to a specific available implementation (2 found)
2019-10-29 19:28:39 -05:00
|
LL | let cont: u32 = </* self type */ as Generator>::create();
| +++++++++++++++++++ +
2018-02-07 21:35:35 -06:00
2021-01-15 07:33:51 -06:00
error[E0283]: type annotations needed
--> $DIR/E0283.rs:35:24
|
LL | let bar = foo_impl.into() * 1u32;
2022-02-14 06:25:26 -06:00
| ^^^^
2021-01-15 07:33:51 -06: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 06:25:26 -06:00
help: try using a fully qualified path to specify the expected types
|
2022-02-14 06:25:26 -06:00
LL | let bar = <Impl as Into<T>>::into(foo_impl) * 1u32;
| ++++++++++++++++++++++++ ~
2021-01-15 07:33:51 -06:00
error: aborting due to 2 previous errors
2018-02-07 21:35:35 -06:00
Some errors have detailed explanations: E0283, E0790.
For more information about an error, try `rustc --explain E0283`.