2023-04-23 06:03:09 -05:00
|
|
|
//@run-rustfix
|
2020-09-10 10:47:07 -05:00
|
|
|
#![allow(unused_must_use)]
|
|
|
|
#![warn(clippy::create_dir)]
|
|
|
|
|
|
|
|
use std::fs::create_dir_all;
|
|
|
|
|
|
|
|
fn create_dir() {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// Should be warned
|
|
|
|
create_dir_all("foo");
|
|
|
|
create_dir_all("bar").unwrap();
|
|
|
|
|
|
|
|
// Shouldn't be warned
|
|
|
|
create_dir();
|
|
|
|
std::fs::create_dir_all("foobar");
|
|
|
|
}
|