summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/ty_fn_sig.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/ty_fn_sig.rs')
-rw-r--r--src/tools/clippy/tests/ui/ty_fn_sig.rs14
1 files changed, 14 insertions, 0 deletions
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
index 000000000..9e2753dcb
--- /dev/null
+++ b/src/tools/clippy/tests/ui/ty_fn_sig.rs
@@ -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();
+ }
+}