]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr
Rollup merge of #98072 - yaahc:generic-member-access, r=thomcc
[rust.git] / src / test / ui / suggestions / let-binding-init-expr-as-ty.stderr
1 error[E0573]: expected type, found local variable `num`
2   --> $DIR/let-binding-init-expr-as-ty.rs:2:27
3    |
4 LL |     let foo: i32::from_be(num);
5    |            --             ^^^ not a type
6    |            |
7    |            help: use `=` if you meant to assign
8
9 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
10   --> $DIR/let-binding-init-expr-as-ty.rs:2:19
11    |
12 LL |     let foo: i32::from_be(num);
13    |                   ^^^^^^^^^^^^ only `Fn` traits may use parentheses
14    |
15 help: use angle brackets instead
16    |
17 LL |     let foo: i32::from_be<num>;
18    |                          ~   ~
19
20 error[E0223]: ambiguous associated type
21   --> $DIR/let-binding-init-expr-as-ty.rs:2:14
22    |
23 LL |     let foo: i32::from_be(num);
24    |              ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<i32 as Trait>::from_be`
25
26 error: aborting due to 3 previous errors
27
28 Some errors have detailed explanations: E0214, E0223, E0573.
29 For more information about an error, try `rustc --explain E0214`.