Skip to content

Commit 88e242e

Browse files
committed
wip
1 parent c4eead5 commit 88e242e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/ui/pathbuf_init_then_push.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
use std::path::PathBuf;
44

55
fn main() {
6-
let mut path_buf = PathBuf::new();
6+
let mut path_buf = PathBuf::new(); //~ ERROR: calls to `push` immediately after creation
77
path_buf.push("foo");
88

9-
path_buf = PathBuf::from("foo");
9+
path_buf = PathBuf::from("foo"); //~ ERROR: calls to `push` immediately after creation
1010
path_buf.push("bar");
1111

1212
let bar = "bar";
13-
path_buf = PathBuf::from("foo");
13+
path_buf = PathBuf::from("foo"); //~ ERROR: calls to `push` immediately after creation
1414
path_buf.push(bar);
1515

16-
let mut path_buf = PathBuf::from("foo").join("bar");
16+
let mut path_buf = PathBuf::from("foo").join("bar"); //~ ERROR: calls to `push` immediately after creation
1717
path_buf.push("buz");
1818

1919
let mut x = PathBuf::new();

0 commit comments

Comments
 (0)