about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-07-31 22:17:12 +0000
committerbors <bors@rust-lang.org>2015-07-31 22:17:12 +0000
commita8b7146f70f9c9409d205adc324da559dfd4ddde (patch)
tree6846b844ad75bbc6fb2b37cf6030e6e0c07a9f11 /src/libsyntax
parent8c634cef958acca4083d677f0ec17ada543077e9 (diff)
parentb5139c5c5868f6f27e06f458fa8ee54c9e8adffb (diff)
downloadrust-a8b7146f70f9c9409d205adc324da559dfd4ddde.tar.gz
rust-a8b7146f70f9c9409d205adc324da559dfd4ddde.zip
Auto merge of #27432 - sanxiyn:impl-dotdot, r=sfackler
Fix #27255.
Diffstat (limited to 'src/libsyntax')
-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");