@@ -47,7 +47,7 @@ impl Emitter for SilentEmitter {
4747 None
4848 }
4949
50- fn emit_diagnostic ( & mut self , _db : & Diagnostic ) { }
50+ fn emit_diagnostic ( & mut self , _db : Diagnostic ) { }
5151}
5252
5353fn silent_emitter ( ) -> Box < DynEmitter > {
@@ -64,7 +64,7 @@ struct SilentOnIgnoredFilesEmitter {
6464}
6565
6666impl SilentOnIgnoredFilesEmitter {
67- fn handle_non_ignoreable_error ( & mut self , db : & Diagnostic ) {
67+ fn handle_non_ignoreable_error ( & mut self , db : Diagnostic ) {
6868 self . has_non_ignorable_parser_errors = true ;
6969 self . can_reset . store ( false , Ordering :: Release ) ;
7070 self . emitter . emit_diagnostic ( db) ;
@@ -86,7 +86,7 @@ impl Emitter for SilentOnIgnoredFilesEmitter {
8686 None
8787 }
8888
89- fn emit_diagnostic ( & mut self , db : & Diagnostic ) {
89+ fn emit_diagnostic ( & mut self , db : Diagnostic ) {
9090 if db. level ( ) == DiagnosticLevel :: Fatal {
9191 return self . handle_non_ignoreable_error ( db) ;
9292 }
@@ -365,7 +365,7 @@ mod tests {
365365 None
366366 }
367367
368- fn emit_diagnostic ( & mut self , _db : & Diagnostic ) {
368+ fn emit_diagnostic ( & mut self , _db : Diagnostic ) {
369369 self . num_emitted_errors . fetch_add ( 1 , Ordering :: Release ) ;
370370 }
371371 }
@@ -424,7 +424,7 @@ mod tests {
424424 ) ;
425425 let span = MultiSpan :: from_span ( mk_sp ( BytePos ( 0 ) , BytePos ( 1 ) ) ) ;
426426 let fatal_diagnostic = build_diagnostic ( DiagnosticLevel :: Fatal , Some ( span) ) ;
427- emitter. emit_diagnostic ( & fatal_diagnostic) ;
427+ emitter. emit_diagnostic ( fatal_diagnostic) ;
428428 assert_eq ! ( num_emitted_errors. load( Ordering :: Acquire ) , 1 ) ;
429429 assert_eq ! ( can_reset_errors. load( Ordering :: Acquire ) , false ) ;
430430 }
@@ -449,7 +449,7 @@ mod tests {
449449 ) ;
450450 let span = MultiSpan :: from_span ( mk_sp ( BytePos ( 0 ) , BytePos ( 1 ) ) ) ;
451451 let non_fatal_diagnostic = build_diagnostic ( DiagnosticLevel :: Warning , Some ( span) ) ;
452- emitter. emit_diagnostic ( & non_fatal_diagnostic) ;
452+ emitter. emit_diagnostic ( non_fatal_diagnostic) ;
453453 assert_eq ! ( num_emitted_errors. load( Ordering :: Acquire ) , 0 ) ;
454454 assert_eq ! ( can_reset_errors. load( Ordering :: Acquire ) , true ) ;
455455 }
@@ -473,7 +473,7 @@ mod tests {
473473 ) ;
474474 let span = MultiSpan :: from_span ( mk_sp ( BytePos ( 0 ) , BytePos ( 1 ) ) ) ;
475475 let non_fatal_diagnostic = build_diagnostic ( DiagnosticLevel :: Warning , Some ( span) ) ;
476- emitter. emit_diagnostic ( & non_fatal_diagnostic) ;
476+ emitter. emit_diagnostic ( non_fatal_diagnostic) ;
477477 assert_eq ! ( num_emitted_errors. load( Ordering :: Acquire ) , 1 ) ;
478478 assert_eq ! ( can_reset_errors. load( Ordering :: Acquire ) , false ) ;
479479 }
@@ -512,9 +512,9 @@ mod tests {
512512 let bar_diagnostic = build_diagnostic ( DiagnosticLevel :: Warning , Some ( bar_span) ) ;
513513 let foo_diagnostic = build_diagnostic ( DiagnosticLevel :: Warning , Some ( foo_span) ) ;
514514 let fatal_diagnostic = build_diagnostic ( DiagnosticLevel :: Fatal , None ) ;
515- emitter. emit_diagnostic ( & bar_diagnostic) ;
516- emitter. emit_diagnostic ( & foo_diagnostic) ;
517- emitter. emit_diagnostic ( & fatal_diagnostic) ;
515+ emitter. emit_diagnostic ( bar_diagnostic) ;
516+ emitter. emit_diagnostic ( foo_diagnostic) ;
517+ emitter. emit_diagnostic ( fatal_diagnostic) ;
518518 assert_eq ! ( num_emitted_errors. load( Ordering :: Acquire ) , 2 ) ;
519519 assert_eq ! ( can_reset_errors. load( Ordering :: Acquire ) , false ) ;
520520 }
0 commit comments