Skip to content

Commit

Permalink
Add accessor methods to DiagnosticBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
murarth committed May 7, 2016
1 parent 0d61bb3 commit 0d5f474
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 0d5f474

Please sign in to comment.