File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -92,15 +92,16 @@ impl<O: Output> PostBuildHandler<O> {
92
92
v. clear ( ) ;
93
93
}
94
94
95
+ let cwd = :: std:: env:: current_dir ( ) . unwrap ( ) ;
96
+
95
97
for msg in & messages {
96
98
if let Some ( FileDiagnostic {
97
99
file_path,
98
100
diagnostic,
99
101
suggestions,
100
- } ) = parse_diagnostics ( msg)
101
- {
102
+ } ) = parse_diagnostics ( msg) {
102
103
results
103
- . entry ( file_path)
104
+ . entry ( cwd . join ( file_path) )
104
105
. or_insert_with ( Vec :: new)
105
106
. push ( ( diagnostic, suggestions) ) ;
106
107
}
@@ -237,11 +238,9 @@ fn primary_span(message: &CompilerMessage) -> Span {
237
238
}
238
239
239
240
fn emit_notifications < O : Output > ( build_results : & BuildResults , show_warnings : bool , out : & O ) {
240
- let cwd = :: std:: env:: current_dir ( ) . unwrap ( ) ;
241
-
242
241
for ( path, diagnostics) in build_results {
243
242
let params = PublishDiagnosticsParams {
244
- uri : Url :: from_file_path ( cwd . join ( path) ) . unwrap ( ) ,
243
+ uri : Url :: from_file_path ( path) . unwrap ( ) ,
245
244
diagnostics : diagnostics
246
245
. iter ( )
247
246
. filter_map ( |& ( ref d, _) | {
You can’t perform that action at this time.
0 commit comments