5
5
//! parent directory, and otherwise documentation can be found throughout the `build`
6
6
//! directory in each respective module.
7
7
8
- use std :: fs :: OpenOptions ;
8
+ # [ cfg ( all ( any ( unix , windows ) , not ( target_os = "solaris" ) ) ) ]
9
9
use std:: io:: Write ;
10
- use std:: { env, fs, process} ;
10
+ #[ cfg( all( any( unix, windows) , not( target_os = "solaris" ) ) ) ]
11
+ use std:: process;
12
+ use std:: { env, fs} ;
11
13
12
14
#[ cfg( all( any( unix, windows) , not( target_os = "solaris" ) ) ) ]
13
15
use bootstrap:: t;
@@ -32,7 +34,7 @@ fn main() {
32
34
} ;
33
35
34
36
build_lock =
35
- fd_lock:: RwLock :: new ( t ! ( OpenOptions :: new( ) . write( true ) . create( true ) . open( & path) ) ) ;
37
+ fd_lock:: RwLock :: new ( t ! ( fs :: OpenOptions :: new( ) . write( true ) . create( true ) . open( & path) ) ) ;
36
38
_build_lock_guard = match build_lock. try_write ( ) {
37
39
Ok ( mut lock) => {
38
40
t ! ( lock. write( & process:: id( ) . to_string( ) . as_ref( ) ) ) ;
@@ -85,7 +87,7 @@ fn main() {
85
87
// HACK: Since the commit script uses hard links, we can't actually tell if it was installed by x.py setup or not.
86
88
// We could see if it's identical to src/etc/pre-push.sh, but pre-push may have been modified in the meantime.
87
89
// Instead, look for this comment, which is almost certainly not in any custom hook.
88
- if std :: fs:: read_to_string ( pre_commit) . map_or ( false , |contents| {
90
+ if fs:: read_to_string ( pre_commit) . map_or ( false , |contents| {
89
91
contents. contains ( "https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570" )
90
92
} ) {
91
93
println ! (
0 commit comments