summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unboxed-closures/unboxed-closures-blanket-fn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/unboxed-closures/unboxed-closures-blanket-fn.rs')
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closures-blanket-fn.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/ui/unboxed-closures/unboxed-closures-blanket-fn.rs b/src/test/ui/unboxed-closures/unboxed-closures-blanket-fn.rs
deleted file mode 100644
index ca1d31ca5..000000000
--- a/src/test/ui/unboxed-closures/unboxed-closures-blanket-fn.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// run-pass
-#![allow(unused_variables)]
-// Test that you can supply `&F` where `F: Fn()`.
-
-#![feature(lang_items)]
-
-fn a<F:Fn() -> i32>(f: F) -> i32 {
- f()
-}
-
-fn b(f: &dyn Fn() -> i32) -> i32 {
- a(f)
-}
-
-fn c<F:Fn() -> i32>(f: &F) -> i32 {
- a(f)
-}
-
-fn main() {
- let z: isize = 7;
-
- let x = b(&|| 22);
- assert_eq!(x, 22);
-
- let x = c(&|| 22);
- assert_eq!(x, 22);
-}