diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-05 13:51:29 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-05 14:56:49 -0500 |
| commit | 4ed2800701fa0634c2aa73e7b090e84be665166a (patch) | |
| tree | f6070b6862a71445d1f1fea55a90267d31757230 /src/libsyntax/parse/parser.rs | |
| parent | bbf7e4e58a9b565342b5990cb3e750932a90a1b6 (diff) | |
| download | rust-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.rs | 8 |
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 } |
