]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/let-binding-init-expr-as-ty.rs
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr
[rust.git] / tests / ui / suggestions / let-binding-init-expr-as-ty.rs
1 pub fn foo(num: i32) -> i32 {
2     let foo: i32::from_be(num);
3     //~^ ERROR expected type, found local variable `num`
4     //~| ERROR parenthesized type parameters may only be used with a `Fn` trait
5     //~| ERROR ambiguous associated type
6     foo
7 }
8
9 fn main() {
10     let _ = foo(42);
11 }