diff options
| author | bors <bors@rust-lang.org> | 2014-01-31 22:21:38 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-31 22:21:38 -0800 |
| commit | 5c5d995126ac3e9b4629a55fce941c558d5bb0cb (patch) | |
| tree | 454a14962add2bfc63aa8c0beff080daf313a15e /src/libsyntax | |
| parent | cc6afe1ec0d3e5e9da4c0f7d0443991afe74dfaf (diff) | |
| parent | a67a3b7749c9a0544b2fe69338c17c6314be935d (diff) | |
| download | rust-5c5d995126ac3e9b4629a55fce941c558d5bb0cb.tar.gz rust-5c5d995126ac3e9b4629a55fce941c558d5bb0cb.zip | |
auto merge of #11965 : alexcrichton/rust/issue-7385, r=alexcrichton
I've verified that it works on osx x86_64 Closes #7385 Rolled up PRs: Closes #11898 Closes #11934 Closes #11942 Closes #11952 Closes #11960 Closes #11966 Closes #11953 Closed issues: Closes #4063 Closes #7911
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 5 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 22 |
4 files changed, 12 insertions, 23 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 40ae98791ef..1513946e401 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -680,7 +680,7 @@ pub enum TokenTree { // // As a final, horrifying aside, note that macro-by-example's input is // also matched by one of these matchers. Holy self-referential! It is matched -// by an MatchSeq, specifically this one: +// by a MatchSeq, specifically this one: // // $( $lhs:matchers => $rhs:tt );+ // diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs index 9ebb771f5da..6449d0aab5e 100644 --- a/src/libsyntax/ext/deriving/generic.rs +++ b/src/libsyntax/ext/deriving/generic.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -42,7 +42,7 @@ arguments: the same variant (e.g. `None`, `Some(1)` and `None`). If `const_nonmatching` is true, this will contain an empty list. - `StaticEnum` and `StaticStruct` for static methods, where the type - being derived upon is either a enum or struct respectively. (Any + being derived upon is either an enum or struct respectively. (Any argument with type Self is just grouped among the non-self arguments.) diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index 6aa1afee206..c4887d55e2a 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -36,7 +36,6 @@ pub enum ObsoleteSyntax { ObsoleteUnsafeExternFn, ObsoleteTraitFuncVisibility, ObsoleteConstPointer, - ObsoleteEmptyImpl, ObsoleteLoopAsContinue, ObsoleteEnumWildcard, ObsoleteStructWildcard, @@ -110,10 +109,6 @@ impl ParserObsoleteMethods for Parser { "instead of `&const Foo` or `@const Foo`, write `&Foo` or \ `@Foo`" ), - ObsoleteEmptyImpl => ( - "empty implementation", - "instead of `impl A;`, write `impl A {}`" - ), ObsoleteLoopAsContinue => ( "`loop` instead of `continue`", "`loop` is now only used for loops and `continue` is used for \ diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 04a984ba95d..642624adfb2 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3926,21 +3926,15 @@ impl Parser { }; let mut meths = ~[]; - let inner_attrs = if self.eat(&token::SEMI) { - self.obsolete(self.last_span, ObsoleteEmptyImpl); - None - } else { - self.expect(&token::LBRACE); - let (inner_attrs, next) = self.parse_inner_attrs_and_next(); - let mut method_attrs = Some(next); - while !self.eat(&token::RBRACE) { - meths.push(self.parse_method(method_attrs)); - method_attrs = None; - } - Some(inner_attrs) - }; + self.expect(&token::LBRACE); + let (inner_attrs, next) = self.parse_inner_attrs_and_next(); + let mut method_attrs = Some(next); + while !self.eat(&token::RBRACE) { + meths.push(self.parse_method(method_attrs)); + method_attrs = None; + } - (ident, ItemImpl(generics, opt_trait, ty, meths), inner_attrs) + (ident, ItemImpl(generics, opt_trait, ty, meths), Some(inner_attrs)) } // parse a::B<~str,int> |
