From 0d5f474f30563383aa0c72ec84d3f2c26fa1c348 Mon Sep 17 00:00:00 2001 From: Murarth Date: Sat, 7 May 2016 10:39:24 -0700 Subject: [PATCH] Add accessor methods to DiagnosticBuilder --- src/libsyntax/errors/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libsyntax/errors/mod.rs b/src/libsyntax/errors/mod.rs index f0c665bcb3c..04f540c81ae 100644 --- a/src/libsyntax/errors/mod.rs +++ b/src/libsyntax/errors/mod.rs @@ -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>,