Skip to content

Commit

Permalink
Add documenation to the emit_for message
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdnes committed Apr 7, 2015
1 parent 8f6b525 commit 050ca46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libsyntax/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 050ca46

Please sign in to comment.