]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/ty_fn_sig.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / ty_fn_sig.rs
diff --git a/src/tools/clippy/tests/ui/ty_fn_sig.rs b/src/tools/clippy/tests/ui/ty_fn_sig.rs
new file mode 100644 (file)
index 0000000..9e2753d
--- /dev/null
@@ -0,0 +1,14 @@
+// Regression test
+
+pub fn retry<F: Fn()>(f: F) {
+    for _i in 0.. {
+        f();
+    }
+}
+
+fn main() {
+    for y in 0..4 {
+        let func = || ();
+        func();
+    }
+}