Fix impl A .. {}
This commit is contained in:
parent
5fcaf95676
commit
b5139c5c58
5 changed files with 19 additions and 4 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue