]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/type-ascription-instead-of-let.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / 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 }