@@ -2,7 +2,7 @@ use std::{
2
2
env,
3
3
ffi:: { OsStr , OsString } ,
4
4
fs:: { self , File } ,
5
- io:: { self , BufRead , BufReader , ErrorKind } ,
5
+ io:: { BufRead , BufReader , ErrorKind } ,
6
6
path:: { Path , PathBuf } ,
7
7
process:: { Command , Stdio } ,
8
8
} ;
@@ -26,14 +26,6 @@ impl Config {
26
26
self . verbose > 0
27
27
}
28
28
29
- pub fn symlink_file < P : AsRef < Path > , Q : AsRef < Path > > ( & self , src : P , link : Q ) -> io:: Result < ( ) > {
30
- #[ cfg( unix) ]
31
- use std:: os:: unix:: fs:: symlink as symlink_file;
32
- #[ cfg( windows) ]
33
- use std:: os:: windows:: fs:: symlink_file;
34
- if !self . dry_run ( ) { symlink_file ( src. as_ref ( ) , link. as_ref ( ) ) } else { Ok ( ( ) ) }
35
- }
36
-
37
29
pub ( crate ) fn create ( & self , path : & Path , s : & str ) {
38
30
if self . dry_run ( ) {
39
31
return ;
@@ -338,15 +330,6 @@ impl Config {
338
330
let bin_root = self . out . join ( host. triple ) . join ( "rustfmt" ) ;
339
331
let rustfmt_path = bin_root. join ( "bin" ) . join ( exe ( "rustfmt" , host) ) ;
340
332
let rustfmt_stamp = bin_root. join ( ".rustfmt-stamp" ) ;
341
-
342
- #[ cfg( not( windows) ) ]
343
- {
344
- let legacy_rustfmt = self . initial_rustc . with_file_name ( exe ( "rustfmt" , host) ) ;
345
- if !legacy_rustfmt. exists ( ) {
346
- t ! ( self . symlink_file( & rustfmt_path, & legacy_rustfmt) ) ;
347
- }
348
- }
349
-
350
333
if rustfmt_path. exists ( ) && !program_out_of_date ( & rustfmt_stamp, & channel) {
351
334
return Some ( rustfmt_path) ;
352
335
}
0 commit comments