mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
16 lines
303 B
Rust
16 lines
303 B
Rust
#![allow(unused_must_use)]
|
|
#![warn(clippy::create_dir)]
|
|
|
|
use std::fs::create_dir_all;
|
|
|
|
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");
|
|
}
|