This repository was archived by the owner on Dec 29, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl Callbacks for ShimCalls {
121
121
let sess = compiler. session ( ) ;
122
122
let input = compiler. input ( ) ;
123
123
124
- let cwd = & sess. working_dir . 0 ;
124
+ let cwd = & sess. working_dir . local_path_if_available ( ) ;
125
125
126
126
let src_path = match input {
127
127
Input :: File ( ref name) => Some ( name. to_path_buf ( ) ) ,
@@ -209,14 +209,14 @@ impl Callbacks for ShimCalls {
209
209
210
210
#[ cfg( feature = "ipc" ) ]
211
211
fn fetch_input_files ( sess : & rustc_session:: Session ) -> Vec < PathBuf > {
212
- let cwd = & sess. working_dir . 0 ;
212
+ let cwd = & sess. working_dir . local_path_if_available ( ) ;
213
213
214
214
sess. source_map ( )
215
215
. files ( )
216
216
. iter ( )
217
217
. filter ( |fmap| fmap. is_real_file ( ) )
218
218
. filter ( |fmap| !fmap. is_imported ( ) )
219
- . map ( |fmap| fmap. name . to_string ( ) )
219
+ . map ( |fmap| fmap. name . prefer_local ( ) . to_string ( ) )
220
220
. map ( |fmap| src_path ( Some ( cwd) , fmap) . unwrap ( ) )
221
221
. collect ( )
222
222
}
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ impl rustc_driver::Callbacks for RlsRustcCalls {
239
239
let input = compiler. input ( ) ;
240
240
let crate_name = queries. crate_name ( ) . unwrap ( ) . peek ( ) . clone ( ) ;
241
241
242
- let cwd = & sess. working_dir . 0 ;
242
+ let cwd = & sess. working_dir . local_path_if_available ( ) ;
243
243
244
244
let src_path = match input {
245
245
Input :: File ( ref name) => Some ( name. to_path_buf ( ) ) ,
@@ -327,14 +327,14 @@ fn clippy_config(config: &mut interface::Config) {
327
327
}
328
328
329
329
fn fetch_input_files ( sess : & Session ) -> Vec < PathBuf > {
330
- let cwd = & sess. working_dir . 0 ;
330
+ let cwd = & sess. working_dir . local_path_if_available ( ) ;
331
331
332
332
sess. source_map ( )
333
333
. files ( )
334
334
. iter ( )
335
335
. filter ( |fmap| fmap. is_real_file ( ) )
336
336
. filter ( |fmap| !fmap. is_imported ( ) )
337
- . map ( |fmap| fmap. name . to_string ( ) )
337
+ . map ( |fmap| fmap. name . prefer_local ( ) . to_string ( ) )
338
338
. map ( |fmap| src_path ( Some ( cwd) , fmap) . unwrap ( ) )
339
339
. collect ( )
340
340
}
You can’t perform that action at this time.
0 commit comments