rust/src/test/ui/suggestions/let-binding-init-expr-as-ty.stderr

31 lines
1.2 KiB
Plaintext
Raw Normal View History

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);
| ^^^ not a type
help: maybe you meant to assign a value instead of defining this let binding's type
|
LL | let foo = i32::from_be(num);
| ^
error: parenthesized type parameters may only be used with a `Fn` trait
--> $DIR/let-binding-init-expr-as-ty.rs:2:19
|
LL | let foo: i32::from_be(num);
| ^^^^^^^^^^^^
|
= note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
error[E0223]: ambiguous associated type
--> $DIR/let-binding-init-expr-as-ty.rs:2:14
|
LL | let foo: i32::from_be(num);
| ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<i32 as Trait>::from_be`
2019-10-18 17:37:28 +00:00
error: aborting due to 3 previous errors
2019-10-18 17:37:28 +00:00
Some errors have detailed explanations: E0223, E0573.
For more information about an error, try `rustc --explain E0223`.