fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.1 KiB28 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: 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   |                   ^^^^^^^^^^^^
14   |
15   = note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default
16   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
17   = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
18
19error[E0223]: ambiguous associated type
20  --> $DIR/let-binding-init-expr-as-ty.rs:2:14
21   |
22LL |     let foo: i32::from_be(num);
23   |              ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<i32 as Trait>::from_be`
24
25error: aborting due to 3 previous errors
26
27Some errors have detailed explanations: E0223, E0573.
28For more information about an error, try `rustc --explain E0223`.