Skip to content

Commit 050ca46

Browse files
committed
Add documenation to the emit_for message
1 parent 8f6b525 commit 050ca46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libsyntax/diagnostic.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ impl Handler {
207207
if lvl == Warning && !self.can_emit_warnings { return }
208208
self.emit.borrow_mut().emit(cmsp, msg, Some(code), lvl);
209209
}
210+
/// Function to emit a message on a level ment to accompany a message on another level.
211+
/// If a warning is issued with a note, the note may be emmitted using emit_for with
212+
/// a lvl warning of Note and a for_lvl parameter of Warning. The other parameters are the same
213+
/// as in the emit function.
210214
pub fn emit_for(&self,
211215
cmsp: Option<(&codemap::CodeMap, Span)>,
212216
msg: &str,

0 commit comments

Comments
 (0)