about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/path_buf_push_overwrite.fixed
blob: 5c818bad3d53d1ed886e0868bcc69b852b61bfd2 (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
}