11error: argument to `Path::join` starts with a path separator
2- --> tests/ui/join_absolute_paths.rs:10 :15
2+ --> tests/ui/join_absolute_paths.rs:8 :15
33 |
44LL | path.join("/sh");
55 | ^^^^^
@@ -19,7 +19,43 @@ LL + PathBuf::from("/sh");
1919 |
2020
2121error: argument to `Path::join` starts with a path separator
22- --> tests/ui/join_absolute_paths.rs:14:15
22+ --> tests/ui/join_absolute_paths.rs:12:15
23+ |
24+ LL | path.join("/sh");
25+ | ^^^^^
26+ |
27+ = note: joining a path starting with separator will replace the path instead
28+ help: if this is unintentional, try removing the starting separator
29+ |
30+ LL - path.join("/sh");
31+ LL + path.join("sh");
32+ |
33+ help: if this is intentional, consider using `Path::new`
34+ |
35+ LL - path.join("/sh");
36+ LL + PathBuf::from("/sh");
37+ |
38+
39+ error: argument to `Path::join` starts with a path separator
40+ --> tests/ui/join_absolute_paths.rs:16:15
41+ |
42+ LL | path.join(r#"/sh"#);
43+ | ^^^^^^^^
44+ |
45+ = note: joining a path starting with separator will replace the path instead
46+ help: if this is unintentional, try removing the starting separator
47+ |
48+ LL - path.join(r#"/sh"#);
49+ LL + path.join(r#"sh"#);
50+ |
51+ help: if this is intentional, consider using `Path::new`
52+ |
53+ LL - path.join(r#"/sh"#);
54+ LL + PathBuf::from(r#"/sh"#);
55+ |
56+
57+ error: argument to `Path::join` starts with a path separator
58+ --> tests/ui/join_absolute_paths.rs:20:15
2359 |
2460LL | path.join("\\user");
2561 | ^^^^^^^^
@@ -28,7 +64,7 @@ LL | path.join("\\user");
2864help: if this is unintentional, try removing the starting separator
2965 |
3066LL - path.join("\\user");
31- LL + path.join("\ user");
67+ LL + path.join("user");
3268 |
3369help: if this is intentional, consider using `Path::new`
3470 |
@@ -37,40 +73,40 @@ LL + PathBuf::from("\\user");
3773 |
3874
3975error: argument to `Path::join` starts with a path separator
40- --> tests/ui/join_absolute_paths.rs:18 :15
76+ --> tests/ui/join_absolute_paths.rs:24 :15
4177 |
42- LL | path.join("/sh ");
43- | ^^^^^
78+ LL | path.join("\\user ");
79+ | ^^^^^^^^
4480 |
4581 = note: joining a path starting with separator will replace the path instead
4682help: if this is unintentional, try removing the starting separator
4783 |
48- LL - path.join("/sh ");
49- LL + path.join("sh ");
84+ LL - path.join("\\user ");
85+ LL + path.join("user ");
5086 |
5187help: if this is intentional, consider using `Path::new`
5288 |
53- LL - path.join("/sh ");
54- LL + PathBuf::from("/sh ");
89+ LL - path.join("\\user ");
90+ LL + PathBuf::from("\\user ");
5591 |
5692
5793error: argument to `Path::join` starts with a path separator
58- --> tests/ui/join_absolute_paths.rs:22 :15
94+ --> tests/ui/join_absolute_paths.rs:28 :15
5995 |
60- LL | path.join(r#"/sh "#);
61- | ^^^^^^^^
96+ LL | path.join(r#"\user "#);
97+ | ^^^^^^^^^^
6298 |
6399 = note: joining a path starting with separator will replace the path instead
64100help: if this is unintentional, try removing the starting separator
65101 |
66- LL - path.join(r#"/sh "#);
67- LL + path.join(r#"sh "#);
102+ LL - path.join(r#"\user "#);
103+ LL + path.join(r#"user "#);
68104 |
69105help: if this is intentional, consider using `Path::new`
70106 |
71- LL - path.join(r#"/sh "#);
72- LL + PathBuf::from(r#"/sh "#);
107+ LL - path.join(r#"\user "#);
108+ LL + PathBuf::from(r#"\user "#);
73109 |
74110
75- error: aborting due to 4 previous errors
111+ error: aborting due to 6 previous errors
76112
0 commit comments