about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/pathbuf_init_then_push.stderr
blob: 1aa730a0bea26a5c724783e3e1d2b0b1557279e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
error: calls to `push` immediately after creation
  --> tests/ui/pathbuf_init_then_push.rs:6:5
   |
LL | /     let mut path_buf = PathBuf::new();
LL | |
LL | |     path_buf.push("foo");
   | |_________________________^ help: consider using the `.join()`: `let mut path_buf = PathBuf::from("foo");`
   |
   = note: `-D clippy::pathbuf-init-then-push` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::pathbuf_init_then_push)]`

error: calls to `push` immediately after creation
  --> tests/ui/pathbuf_init_then_push.rs:10:5
   |
LL | /     path_buf = PathBuf::from("foo");
LL | |
LL | |     path_buf.push("bar");
   | |_________________________^ help: consider using the `.join()`: `path_buf = PathBuf::from("foo").join("bar");`

error: calls to `push` immediately after creation
  --> tests/ui/pathbuf_init_then_push.rs:15:5
   |
LL | /     path_buf = PathBuf::from("foo");
LL | |
LL | |     path_buf.push(bar);
   | |_______________________^ help: consider using the `.join()`: `path_buf = PathBuf::from("foo").join(bar);`

error: calls to `push` immediately after creation
  --> tests/ui/pathbuf_init_then_push.rs:19:5
   |
LL | /     let mut path_buf = PathBuf::from("foo").join("bar");
LL | |
LL | |     path_buf.push("buz");
   | |_________________________^ help: consider using the `.join()`: `let mut path_buf = PathBuf::from("foo").join("bar").join("buz");`

error: aborting due to 4 previous errors