summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/type-ascription-instead-of-let.rs
blob: 6e1c86f96711923fb9d3447d9459e9af1cb5b1d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-rustfix

fn fun(x: i32) -> i32 { x }

fn main() {
    let _closure_annotated = |value: i32| -> i32 {
        temp: i32 = fun(5i32);
        //~^ ERROR expected identifier, found `:`
        temp + value + 1
    };
}