2019-10-18 17:33:25 +00:00
|
|
|
error[E0573]: expected type, found local variable `num`
|
|
|
|
--> $DIR/let-binding-init-expr-as-ty.rs:2:27
|
|
|
|
|
|
|
|
|
LL | let foo: i32::from_be(num);
|
2019-10-19 17:13:56 +00:00
|
|
|
| -- ^^^ not a type
|
|
|
|
| |
|
|
|
|
| help: use `=` if you meant to assign
|
2019-10-18 17:33:25 +00:00
|
|
|
|
2019-08-03 17:58:26 +00:00
|
|
|
error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
|
2019-10-18 17:33:25 +00:00
|
|
|
--> $DIR/let-binding-init-expr-as-ty.rs:2:19
|
|
|
|
|
|
|
|
|
LL | let foo: i32::from_be(num);
|
2022-06-15 01:50:34 +00:00
|
|
|
| ^^^^^^^^^^^^ only `Fn` traits may use parentheses
|
|
|
|
|
|
|
|
|
help: use angle brackets instead
|
|
|
|
|
|
|
|
|
LL | let foo: i32::from_be<num>;
|
|
|
|
| ~ ~
|
2019-08-03 17:58:26 +00:00
|
|
|
|
2019-10-18 17:33:25 +00:00
|
|
|
error[E0223]: ambiguous associated type
|
|
|
|
--> $DIR/let-binding-init-expr-as-ty.rs:2:14
|
|
|
|
|
|
|
|
|
LL | let foo: i32::from_be(num);
|
2023-01-08 06:54:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: if there were a trait named `Example` with associated type `from_be` implemented for `i32`, you could use the fully-qualified path
|
|
|
|
|
|
|
|
|
LL | let foo: <i32 as Example>::from_be;
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
2019-10-18 17:33:25 +00:00
|
|
|
|
2019-12-08 17:22:35 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2019-10-18 17:33:25 +00:00
|
|
|
|
2019-12-08 17:22:35 +00:00
|
|
|
Some errors have detailed explanations: E0214, E0223, E0573.
|
|
|
|
For more information about an error, try `rustc --explain E0214`.
|