File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
use std:: path:: PathBuf ;
4
4
5
5
fn main ( ) {
6
- let mut path_buf = PathBuf :: new ( ) ;
6
+ let mut path_buf = PathBuf :: new ( ) ; //~ ERROR: calls to `push` immediately after creation
7
7
path_buf. push ( "foo" ) ;
8
8
9
- path_buf = PathBuf :: from ( "foo" ) ;
9
+ path_buf = PathBuf :: from ( "foo" ) ; //~ ERROR: calls to `push` immediately after creation
10
10
path_buf. push ( "bar" ) ;
11
11
12
12
let bar = "bar" ;
13
- path_buf = PathBuf :: from ( "foo" ) ;
13
+ path_buf = PathBuf :: from ( "foo" ) ; //~ ERROR: calls to `push` immediately after creation
14
14
path_buf. push ( bar) ;
15
15
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
17
17
path_buf. push ( "buz" ) ;
18
18
19
19
let mut x = PathBuf :: new ( ) ;
You can’t perform that action at this time.
0 commit comments