about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2015-07-31 21:24:55 +0900
committerSeo Sanghyeon <sanxiyn@gmail.com>2015-07-31 21:24:55 +0900
commitb5139c5c5868f6f27e06f458fa8ee54c9e8adffb (patch)
tree5c113f77599da1138778d71c6ca82bd559d588cf /src/libsyntax/parse/parser.rs
parent5fcaf9567691c91eb48693ba9ec234703fd4e0d0 (diff)
downloadrust-b5139c5c5868f6f27e06f458fa8ee54c9e8adffb.tar.gz
rust-b5139c5c5868f6f27e06f458fa8ee54c9e8adffb.zip
Fix `impl A .. {}`
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 11611c9adb0..e7ab9a73c0f 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4610,7 +4610,7 @@ impl<'a> Parser<'a> {
             None
         };
 
-        if try!(self.eat(&token::DotDot) ){
+        if opt_trait.is_some() && try!(self.eat(&token::DotDot) ){
             if generics.is_parameterized() {
                 self.span_err(impl_span, "default trait implementations are not \
                                           allowed to have generics");