summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-02 10:50:07 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-02 10:50:07 -0800
commit1f2ead1629ce544d98f35225061d216abd86d5a6 (patch)
treea1d9e04d84ea7770c57279dd058c8b01d1f37392 /src/libsyntax/parse
parent6f567e0c29b7987517a4281927fe5265bc6feb30 (diff)
parent4b40bc85cbc1d072179c92ce01655db0272aa598 (diff)
downloadrust-1f2ead1629ce544d98f35225061d216abd86d5a6.tar.gz
rust-1f2ead1629ce544d98f35225061d216abd86d5a6.zip
Merge remote-tracking branch 'origin/master' into rollup
Conflicts:
	src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 9665e61a8cf..c597968d4ae 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -547,6 +547,10 @@ impl<'a> Parser<'a> {
     pub fn parse_path_list_item(&mut self) -> ast::PathListItem {
         let lo = self.span.lo;
         let node = if self.eat_keyword(keywords::Mod) {
+            let span = self.last_span;
+            self.span_warn(span, "deprecated syntax; use the `self` keyword now");
+            ast::PathListMod { id: ast::DUMMY_NODE_ID }
+        } else if self.eat_keyword(keywords::Self) {
             ast::PathListMod { id: ast::DUMMY_NODE_ID }
         } else {
             let ident = self.parse_ident();