From 050ca4679f07b8bcaec13d17323de03a8be51828 Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Tue, 7 Apr 2015 21:40:33 +0200 Subject: [PATCH] Add documenation to the emit_for message --- src/libsyntax/diagnostic.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index 6e34402a7fb26..9668bb52d5d62 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -207,6 +207,10 @@ impl Handler { if lvl == Warning && !self.can_emit_warnings { return } self.emit.borrow_mut().emit(cmsp, msg, Some(code), lvl); } + /// Function to emit a message on a level ment to accompany a message on another level. + /// If a warning is issued with a note, the note may be emmitted using emit_for with + /// a lvl warning of Note and a for_lvl parameter of Warning. The other parameters are the same + /// as in the emit function. pub fn emit_for(&self, cmsp: Option<(&codemap::CodeMap, Span)>, msg: &str,