extern crate test;
extern crate getopts;
-#[phase(plugin, link)] extern crate log;
+
+#[cfg(stage0)]
+#[phase(plugin, link)]
+extern crate log;
+
+#[cfg(not(stage0))]
+#[macro_use]
+extern crate log;
extern crate regex;
use std::os;
use std::io;
use std::io::fs;
-use std::str::{FromStr, from_str};
+use std::str::FromStr;
use std::thunk::Thunk;
use getopts::{optopt, optflag, reqopt};
use common::Config;
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),