]> git.lizzy.rs Git - rust.git/blobdiff - src/compiletest/compiletest.rs
rollup merge of #20482: kmcallister/macro-reform
[rust.git] / src / compiletest / compiletest.rs
index ee6bc0b4fa88bd8f20fce32e21f4835a8ddb6281..0ce31a335d8ab7d698804a6ed7efd31172d23a67 100644 (file)
@@ -346,8 +346,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),