Skip to content

Commit

Permalink
Rollup merge of rust-lang#33484 - murarth:diagnostic-builder-fields, …
Browse files Browse the repository at this point in the history
…r=brson

Add accessor methods to DiagnosticBuilder
  • Loading branch information
Manishearth committed May 8, 2016
2 parents 8b08ebf + 0d5f474 commit 6249772
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libsyntax/errors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ impl<'a> DiagnosticBuilder<'a> {
self
}

pub fn message(&self) -> &str {
&self.message
}

pub fn level(&self) -> Level {
self.level
}

/// Convenience function for internal use, clients should use one of the
/// struct_* methods on Handler.
fn new(emitter: &'a RefCell<Box<Emitter>>,
Expand Down

0 comments on commit 6249772

Please sign in to comment.