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