Fix impl A .. {}

This commit is contained in:
Seo Sanghyeon 2015-07-31 21:24:55 +09:00
parent 5fcaf95676
commit b5139c5c58
5 changed files with 19 additions and 4 deletions

View file

@ -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");