From b5139c5c5868f6f27e06f458fa8ee54c9e8adffb Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Fri, 31 Jul 2015 21:24:55 +0900 Subject: Fix `impl A .. {}` --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse/parser.rs') 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"); -- cgit 1.4.1-3-g733a5