fork/rust

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

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

master
1.2 KiB34 linesraw
1error[E0573]: expected type, found local variable `num`
2  --> $DIR/let-binding-init-expr-as-ty.rs:2:27
3   |
4LL |     let foo: i32::from_be(num);
5   |            --             ^^^ not a type
6   |            |
7   |            help: use `=` if you meant to assign
8
9error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
10  --> $DIR/let-binding-init-expr-as-ty.rs:2:19
11   |
12LL |     let foo: i32::from_be(num);
13   |                   ^^^^^^^^^^^^ only `Fn` traits may use parentheses
14   |
15help: use angle brackets instead
16   |
17LL |     let foo: i32::from_be<num>;
18   |                          ~   ~
19
20error[E0223]: ambiguous associated type
21  --> $DIR/let-binding-init-expr-as-ty.rs:2:14
22   |
23LL |     let foo: i32::from_be(num);
24   |              ^^^^^^^^^^^^^^^^^
25   |
26help: if there were a trait named `Example` with associated type `from_be` implemented for `i32`, you could use the fully-qualified path
27   |
28LL |     let foo: <i32 as Example>::from_be;
29   |              ~~~~~~~~~~~~~~~~~~~~~~~~~
30
31error: aborting due to 3 previous errors
32
33Some errors have detailed explanations: E0214, E0223, E0573.
34For more information about an error, try `rustc --explain E0214`.