File tree 2 files changed +1
-5
lines changed
2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,16 @@ fn main() {
6
6
// should be linted
7
7
let path = Path :: new ( "/bin" ) ;
8
8
path. join ( "/sh" ) ;
9
- println ! ( "{}" , path. display( ) ) ;
10
9
11
10
//should be linted
12
11
let path = Path :: new ( "C:\\ Users" ) ;
13
12
path. join ( "\\ user" ) ;
14
- println ! ( "{}" , path. display( ) ) ;
15
13
16
14
// should not be linted
17
15
let path: & [ & str ] = & [ "/bin" ] ;
18
16
path. join ( "/sh" ) ;
19
- println ! ( "{:?}" , path) ;
20
17
21
18
//should not be linted
22
19
let path = Path :: new ( "/bin" ) ;
23
20
path. join ( "sh" ) ;
24
- println ! ( "{}" , path. display( ) ) ;
25
21
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ LL | path.join("/sh");
10
10
= note: `-D clippy::join-absolute-paths` implied by `-D warnings`
11
11
12
12
error: argument to `Path::join` starts with a path separator
13
- --> $DIR/join_absolute_paths.rs:13 :15
13
+ --> $DIR/join_absolute_paths.rs:12 :15
14
14
|
15
15
LL | path.join("//user");
16
16
| ^^^^^^^^
You can’t perform that action at this time.
0 commit comments