fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB37 linesraw
1error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
2  --> $DIR/E0283.rs:30:21
3   |
4LL |     fn create() -> u32;
5   |     ------------------- `Generator::create` defined here
6...
7LL |     let cont: u32 = Generator::create();
8   |                     ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
9   |
10help: use a fully-qualified path to a specific available implementation
11   |
12LL |     let cont: u32 = </* self type */ as Generator>::create();
13   |                     +++++++++++++++++++          +
14
15error[E0283]: type annotations needed
16  --> $DIR/E0283.rs:35:24
17   |
18LL |     let bar = foo_impl.into() * 1u32;
19   |                        ^^^^
20   |
21note: multiple `impl`s satisfying `Impl: Into<_>` found
22  --> $DIR/E0283.rs:17:1
23   |
24LL | impl Into<u32> for Impl {
25   | ^^^^^^^^^^^^^^^^^^^^^^^
26   = note: and another `impl` found in the `core` crate:
27           - impl<T, U> Into<U> for T
28             where U: From<T>;
29help: try using a fully qualified path to specify the expected types
30   |
31LL |     let bar = <Impl as Into<T>>::into(foo_impl) * 1u32;
32   |               ++++++++++++++++++++++++        ~
33
34error: aborting due to 2 previous errors
35
36Some errors have detailed explanations: E0283, E0790.
37For more information about an error, try `rustc --explain E0283`.