File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 31
31
#![ feature( rustc_private) ]
32
32
#![ feature( staged_api) ]
33
33
#![ feature( unicode) ]
34
- #![ feature( path_ext) ]
35
34
#![ feature( str_char) ]
36
35
37
36
extern crate arena;
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ use parse::PResult;
78
78
use diagnostic:: FatalError ;
79
79
80
80
use std:: collections:: HashSet ;
81
+ use std:: fs;
81
82
use std:: io:: prelude:: * ;
82
83
use std:: mem;
83
84
use std:: path:: { Path , PathBuf } ;
@@ -4775,8 +4776,8 @@ impl<'a> Parser<'a> {
4775
4776
let secondary_path_str = format ! ( "{}/mod.rs" , mod_name) ;
4776
4777
let default_path = dir_path. join ( & default_path_str[ ..] ) ;
4777
4778
let secondary_path = dir_path. join ( & secondary_path_str[ ..] ) ;
4778
- let default_exists = default_path. exists ( ) ;
4779
- let secondary_exists = secondary_path. exists ( ) ;
4779
+ let default_exists = fs :: metadata ( & default_path) . is_ok ( ) ;
4780
+ let secondary_exists = fs :: metadata ( & secondary_path) . is_ok ( ) ;
4780
4781
4781
4782
if !self . owns_directory {
4782
4783
self . span_err ( id_sp,
You can’t perform that action at this time.
0 commit comments