]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/type-ascription-instead-of-let.rs
Rollup merge of #59432 - phansch:compiletest_docs, r=alexcrichton
[rust.git] / src / test / ui / suggestions / type-ascription-instead-of-let.rs
1 fn fun(x: i32) -> i32 { x }
2
3 fn main() {
4     let closure_annotated = |value: i32| -> i32 {
5         temp: i32 = fun(5i32);
6         //~^ ERROR cannot find value `temp` in this scope
7         temp + value + 1
8         //~^ ERROR cannot find value `temp` in this scope
9     };
10 }