summaryrefslogtreecommitdiff
path: root/tests/ui/suggestions/type-ascription-instead-of-let.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/type-ascription-instead-of-let.fixed')
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-let.fixed11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.fixed b/tests/ui/suggestions/type-ascription-instead-of-let.fixed
new file mode 100644
index 00000000000..e3d03b6f22a
--- /dev/null
+++ b/tests/ui/suggestions/type-ascription-instead-of-let.fixed
@@ -0,0 +1,11 @@
+// run-rustfix
+
+fn fun(x: i32) -> i32 { x }
+
+fn main() {
+ let _closure_annotated = |value: i32| -> i32 {
+ let temp: i32 = fun(5i32);
+ //~^ ERROR expected identifier, found `:`
+ temp + value + 1
+ };
+}