about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0ae43db8315..aee843bd857 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[macro_escape];
+#![macro_escape]
 
 use abi;
 use abi::AbiSet;
@@ -811,6 +811,9 @@ impl<'a> Parser<'a> {
     pub fn warn(&mut self, m: &str) {
         self.sess.span_diagnostic.span_warn(self.span, m)
     }
+    pub fn span_warn(&mut self, sp: Span, m: &str) {
+        self.sess.span_diagnostic.span_warn(sp, m)
+    }
     pub fn span_err(&mut self, sp: Span, m: &str) {
         self.sess.span_diagnostic.span_err(sp, m)
     }