]> git.lizzy.rs Git - rust.git/blobdiff - src/compiletest/compiletest.rs
compiletest: remove boxed closures
[rust.git] / src / compiletest / compiletest.rs
index 350a10ce4832a9debfe68b687f3e2dc578cba0ab..48610b6b526d22899df5a4061453f673fd761cd5 100644 (file)
@@ -339,8 +339,9 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
     return valid;
 }
 
-pub fn make_test(config: &Config, testfile: &Path, f: || -> test::TestFn)
-                 -> test::TestDescAndFn {
+pub fn make_test<F>(config: &Config, testfile: &Path, f: F) -> test::TestDescAndFn where
+    F: FnOnce() -> test::TestFn,
+{
     test::TestDescAndFn {
         desc: test::TestDesc {
             name: make_test_name(config, testfile),