rust/tests/ui/create_dir.rs
2020-08-31 22:40:47 +09:00

16 lines
288 B
Rust

// run-rustfix
#![allow(unused_must_use)]
#![warn(clippy::create_dir)]
fn create_dir() {}
fn main() {
// Should be warned
std::fs::create_dir("foo");
std::fs::create_dir("bar").unwrap();
// Shouldn't be warned
create_dir();
std::fs::create_dir_all("foobar");
}