about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-02 16:31:26 +0000
committerbors <bors@rust-lang.org>2015-01-02 16:31:26 +0000
commit4b40bc85cbc1d072179c92ce01655db0272aa598 (patch)
treee9ea8c89e3dbde74c6e87899e440a0ec0649887c /src/libsyntax/parse
parent71b46b18a274edc7f7fb60b490e5ebbb9c911462 (diff)
parentdc53461a983ec4f5bc50291e71bfc67fd3d2d815 (diff)
downloadrust-4b40bc85cbc1d072179c92ce01655db0272aa598.tar.gz
rust-4b40bc85cbc1d072179c92ce01655db0272aa598.zip
auto merge of #20365 : nick29581/rust/mod, r=huonw
Part of #20361 and #20362
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 457085f5cc8..f84ddcf360e 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -546,6 +546,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();