2023-04-20 09:37:15 -05:00
|
|
|
//@run-rustfix
|
2020-08-28 04:40:22 -05:00
|
|
|
#![allow(unused_must_use)]
|
|
|
|
#![warn(clippy::create_dir)]
|
|
|
|
|
2020-09-08 09:35:19 -05:00
|
|
|
use std::fs::create_dir_all;
|
|
|
|
|
2020-08-31 08:40:47 -05:00
|
|
|
fn create_dir() {}
|
2020-08-28 04:40:22 -05:00
|
|
|
|
|
|
|
fn main() {
|
2020-08-31 08:40:47 -05:00
|
|
|
// Should be warned
|
2020-09-08 09:35:19 -05:00
|
|
|
create_dir_all("foo");
|
|
|
|
create_dir_all("bar").unwrap();
|
2020-08-28 04:40:22 -05:00
|
|
|
|
2020-08-31 08:40:47 -05:00
|
|
|
// Shouldn't be warned
|
|
|
|
create_dir();
|
2020-08-28 04:40:22 -05:00
|
|
|
std::fs::create_dir_all("foobar");
|
|
|
|
}
|