File tree 1 file changed +3
-2
lines changed
compiler/rustc_errors/src
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -644,13 +644,14 @@ impl Handler {
644
644
inner. stashed_diagnostics = Default :: default ( ) ;
645
645
}
646
646
647
- /// Stash a given diagnostic with the given `Span` and `StashKey` as the key for later stealing.
647
+ /// Stash a given diagnostic with the given `Span` and [`StashKey`] as the key.
648
+ /// Retrieve a stashed diagnostic with [`steal_diagnostic`].
648
649
pub fn stash_diagnostic ( & self , span : Span , key : StashKey , diag : Diagnostic ) {
649
650
let mut inner = self . inner . borrow_mut ( ) ;
650
651
inner. stash ( ( span, key) , diag) ;
651
652
}
652
653
653
- /// Steal a previously stashed diagnostic with the given `Span` and `StashKey` as the key.
654
+ /// Steal a previously stashed diagnostic with the given `Span` and [ `StashKey`] as the key.
654
655
pub fn steal_diagnostic ( & self , span : Span , key : StashKey ) -> Option < DiagnosticBuilder < ' _ , ( ) > > {
655
656
let mut inner = self . inner . borrow_mut ( ) ;
656
657
inner. steal ( ( span, key) ) . map ( |diag| DiagnosticBuilder :: new_diagnostic ( self , diag) )
You can’t perform that action at this time.
0 commit comments