about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-05 18:47:45 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-05 18:47:45 -0800
commitafbce050ca3748a66b9e9783dc50f6c77f9bdf8b (patch)
tree300e5e6c014bf748c65be267bd4bb99edf416000 /src/libsyntax/parse/parser.rs
parentcf8a11e98bf3871cf3475913fd68187784b542a3 (diff)
parentcd4205a970b07a9f4e8a2a6363ebe535df530386 (diff)
downloadrust-afbce050ca3748a66b9e9783dc50f6c77f9bdf8b.tar.gz
rust-afbce050ca3748a66b9e9783dc50f6c77f9bdf8b.zip
rollup merge of #20556: japaric/no-for-sized
Conflicts:
	src/libcollections/slice.rs
	src/libcollections/str.rs
	src/libcore/borrow.rs
	src/libcore/cmp.rs
	src/libcore/ops.rs
	src/libstd/c_str.rs
	src/test/compile-fail/issue-19009.rs
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 9b3df744317..2eb77489c6e 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -5052,6 +5052,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;
@@ -5069,8 +5070,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
         }