about summary refs log tree commit diff
path: root/src/libsyntax/diagnostic.rs
diff options
context:
space:
mode:
authorJakub Wieczorek <jakub@jakub.cc>2014-07-11 18:54:01 +0200
committerJakub Wieczorek <jakub@jakub.cc>2014-07-12 21:53:34 +0200
commita5fe176e9715f6e67a3ede3d204ba84b2f92ce7d (patch)
treed8df65f649f4df474a02e6baf9d4b371b802e5f5 /src/libsyntax/diagnostic.rs
parent350f3aa856682fed816a0a2018b3bcf50178eeff (diff)
downloadrust-a5fe176e9715f6e67a3ede3d204ba84b2f92ce7d.tar.gz
rust-a5fe176e9715f6e67a3ede3d204ba84b2f92ce7d.zip
Convert a first batch of diagnostics to have error codes
Diffstat (limited to 'src/libsyntax/diagnostic.rs')
-rw-r--r--src/libsyntax/diagnostic.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs
index 9bb5eae2ed2..0b26a641f8d 100644
--- a/src/libsyntax/diagnostic.rs
+++ b/src/libsyntax/diagnostic.rs
@@ -98,6 +98,9 @@ impl SpanHandler {
     pub fn span_warn(&self, sp: Span, msg: &str) {
         self.handler.emit(Some((&self.cm, sp)), msg, Warning);
     }
+    pub fn span_warn_with_code(&self, sp: Span, msg: &str, code: &str) {
+        self.handler.emit_with_code(Some((&self.cm, sp)), msg, code, Warning);
+    }
     pub fn span_note(&self, sp: Span, msg: &str) {
         self.handler.emit(Some((&self.cm, sp)), msg, Note);
     }