Revamp the "future incompatible" section to clarify the situation

better
This commit is contained in:
Niko Matsakis
2016-01-08 17:53:44 -05:00
parent 7cffc9b195
commit 259379426c
8 changed files with 76 additions and 21 deletions

View File

@@ -160,6 +160,17 @@ impl<'a> DiagnosticBuilder<'a> {
self.sub(Level::Note, msg, Some(sp), None);
self
}
pub fn warn(&mut self, msg: &str) -> &mut DiagnosticBuilder<'a> {
self.sub(Level::Warning, msg, None, None);
self
}
pub fn span_warn(&mut self,
sp: Span,
msg: &str)
-> &mut DiagnosticBuilder<'a> {
self.sub(Level::Warning, msg, Some(sp), None);
self
}
pub fn help(&mut self , msg: &str) -> &mut DiagnosticBuilder<'a> {
self.sub(Level::Help, msg, None, None);
self