about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/path_buf_push_overwrite.rs
blob: 650ae3286a0cb788fed9d42e4f936d84b1c63d37 (plain)
1
2
3
4
5
6
7
8
9
use std::path::PathBuf;

#[warn(clippy::path_buf_push_overwrite)]
#[allow(clippy::pathbuf_init_then_push)]
fn main() {
    let mut x = PathBuf::from("/foo");
    x.push("/bar");
    //~^ path_buf_push_overwrite
}