summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/create_dir.fixed
blob: 4a5b1b77be6be45a09a66ae9d86a1ca33a7b81ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![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
    create_dir_all("bar").unwrap();
    //~^ create_dir

    // Shouldn't be warned
    create_dir();
    std::fs::create_dir_all("foobar");
}