Skip to content

Commit

Permalink
Auto merge of #33484 - murarth:diagnostic-builder-fields, r=brson
Browse files Browse the repository at this point in the history
Add accessor methods to DiagnosticBuilder
  • Loading branch information
bors committed May 9, 2016
2 parents 32683ce + 0d5f474 commit 0cc9097
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 0cc9097

Please sign in to comment.