Skip to content

Commit 3506029

Browse files
huonwalexcrichton
authored andcommitted
---
yaml --- r: 101357 b: refs/heads/master c: a9f73b5 h: refs/heads/master i: 101355: 9d9032d v: v3
1 parent ae6d90c commit 3506029

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6c52e72214fbcebee4a216aefa8dea3ec3cacbdc
2+
refs/heads/master: a9f73b5e3d947c3b8ef8c3a8fbd30823ba099886
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff

trunk/src/libsyntax/parse/obsolete.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ pub enum ObsoleteSyntax {
3636
ObsoleteUnsafeExternFn,
3737
ObsoleteTraitFuncVisibility,
3838
ObsoleteConstPointer,
39-
ObsoleteEmptyImpl,
4039
ObsoleteLoopAsContinue,
4140
ObsoleteEnumWildcard,
4241
ObsoleteStructWildcard,
@@ -110,10 +109,6 @@ impl ParserObsoleteMethods for Parser {
110109
"instead of `&const Foo` or `@const Foo`, write `&Foo` or \
111110
`@Foo`"
112111
),
113-
ObsoleteEmptyImpl => (
114-
"empty implementation",
115-
"instead of `impl A;`, write `impl A {}`"
116-
),
117112
ObsoleteLoopAsContinue => (
118113
"`loop` instead of `continue`",
119114
"`loop` is now only used for loops and `continue` is used for \

trunk/src/libsyntax/parse/parser.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3926,21 +3926,15 @@ impl Parser {
39263926
};
39273927

39283928
let mut meths = ~[];
3929-
let inner_attrs = if self.eat(&token::SEMI) {
3930-
self.obsolete(self.last_span, ObsoleteEmptyImpl);
3931-
None
3932-
} else {
3933-
self.expect(&token::LBRACE);
3934-
let (inner_attrs, next) = self.parse_inner_attrs_and_next();
3935-
let mut method_attrs = Some(next);
3936-
while !self.eat(&token::RBRACE) {
3937-
meths.push(self.parse_method(method_attrs));
3938-
method_attrs = None;
3939-
}
3940-
Some(inner_attrs)
3941-
};
3929+
self.expect(&token::LBRACE);
3930+
let (inner_attrs, next) = self.parse_inner_attrs_and_next();
3931+
let mut method_attrs = Some(next);
3932+
while !self.eat(&token::RBRACE) {
3933+
meths.push(self.parse_method(method_attrs));
3934+
method_attrs = None;
3935+
}
39423936

3943-
(ident, ItemImpl(generics, opt_trait, ty, meths), inner_attrs)
3937+
(ident, ItemImpl(generics, opt_trait, ty, meths), Some(inner_attrs))
39443938
}
39453939

39463940
// parse a::B<~str,int>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
impl Foo; //~ ERROR expected `{` but found `;`

0 commit comments

Comments
 (0)