about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-05 13:51:29 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-05 14:56:49 -0500
commit4ed2800701fa0634c2aa73e7b090e84be665166a (patch)
treef6070b6862a71445d1f1fea55a90267d31757230 /src/libsyntax/parse/parser.rs
parentbbf7e4e58a9b565342b5990cb3e750932a90a1b6 (diff)
downloadrust-4ed2800701fa0634c2aa73e7b090e84be665166a.tar.gz
rust-4ed2800701fa0634c2aa73e7b090e84be665166a.zip
syntax: obsolete the `for Sized?` syntax
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index cc67079e538..aedfaac59c5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -5003,6 +5003,7 @@ impl<'a> Parser<'a> {
         // re-jigged shortly in any case, so leaving the hacky version for now.
         if self.eat_keyword(keywords::For) {
             let span = self.span;
+
             let mut ate_question = false;
             if self.eat(&token::Question) {
                 ate_question = true;
@@ -5020,8 +5021,11 @@ impl<'a> Parser<'a> {
                     "expected `?Sized` after `for` in trait item");
                 return None;
             }
-            let tref = Parser::trait_ref_from_ident(ident, span);
-            Some(tref)
+            let _tref = Parser::trait_ref_from_ident(ident, span);
+
+            self.obsolete(span, ObsoleteForSized);
+
+            None
         } else {
             None
         }