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 33use std:: path:: PathBuf ;
44
55fn main ( ) {
6- let mut path_buf = PathBuf :: new ( ) ;
6+ let mut path_buf = PathBuf :: new ( ) ; //~ ERROR: calls to `push` immediately after creation
77 path_buf. push ( "foo" ) ;
88
9- path_buf = PathBuf :: from ( "foo" ) ;
9+ path_buf = PathBuf :: from ( "foo" ) ; //~ ERROR: calls to `push` immediately after creation
1010 path_buf. push ( "bar" ) ;
1111
1212 let bar = "bar" ;
13- path_buf = PathBuf :: from ( "foo" ) ;
13+ path_buf = PathBuf :: from ( "foo" ) ; //~ ERROR: calls to `push` immediately after creation
1414 path_buf. push ( bar) ;
1515
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
1717 path_buf. push ( "buz" ) ;
1818
1919 let mut x = PathBuf :: new ( ) ;
You can’t perform that action at this time.
0 commit comments