1 // ignore-cloudabi no std::fs support
3 // Test that we do some basic error correction in the tokeniser (and don't spew
4 // too many bogus errors).
10 pub fn ensure_dir_exists<P: AsRef<Path>, F: FnOnce(&Path)>(path: P,
13 if !is_directory(path.as_ref()) {
14 //~^ ERROR cannot find function `is_directory`
15 callback(path.as_ref();
16 //~^ ERROR expected one of
17 fs::create_dir_all(path.as_ref()).map(|()| true)
19 //~^ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `)`