File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed
Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,16 @@ fn main() {
66 // should be linted
77 let path = Path :: new ( "/bin" ) ;
88 path. join ( "/sh" ) ;
9- println ! ( "{}" , path. display( ) ) ;
109
1110 //should be linted
1211 let path = Path :: new ( "C:\\ Users" ) ;
1312 path. join ( "\\ user" ) ;
14- println ! ( "{}" , path. display( ) ) ;
1513
1614 // should not be linted
1715 let path: & [ & str ] = & [ "/bin" ] ;
1816 path. join ( "/sh" ) ;
19- println ! ( "{:?}" , path) ;
2017
2118 //should not be linted
2219 let path = Path :: new ( "/bin" ) ;
2320 path. join ( "sh" ) ;
24- println ! ( "{}" , path. display( ) ) ;
2521}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ LL | path.join("/sh");
1010 = note: `-D clippy::join-absolute-paths` implied by `-D warnings`
1111
1212error: 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
1414 |
1515LL | path.join("//user");
1616 | ^^^^^^^^
You can’t perform that action at this time.
0 commit comments