mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 03:53:20 +00:00
18 lines
318 B
Rust
18 lines
318 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
|
||
|
std::fs::create_dir("foo");
|
||
|
std::fs::create_dir("bar").unwrap();
|
||
|
|
||
|
// Shouldn't be warned
|
||
|
create_dir();
|
||
|
std::fs::create_dir_all("foobar");
|
||
|
}
|