mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
17 lines
308 B
Rust
17 lines
308 B
Rust
// run-rustfix
|
|
#![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");
|
|
}
|