rust/tests/ui/suggestions/let-binding-init-expr-as-ty.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
286 B
Rust
Raw Normal View History

2019-10-18 17:37:28 +00:00
pub fn foo(num: i32) -> i32 {
let foo: i32::from_be(num);
//~^ ERROR expected type, found local variable `num`
//~| ERROR parenthesized type parameters may only be used with a `Fn` trait
//~| ERROR ambiguous associated type
2019-10-18 17:37:28 +00:00
foo
}
fn main() {
let _ = foo(42);
}