reject impl keyword in impl header
This commit is contained in:
@@ -54,8 +54,16 @@ pub(super) fn impl_item(p: &mut Parser) {
|
|||||||
|
|
||||||
// test impl_item_neg
|
// test impl_item_neg
|
||||||
// impl !Send for X {}
|
// impl !Send for X {}
|
||||||
|
if p.at(IMPL_KW) {
|
||||||
|
p.error("expected type");
|
||||||
|
} else {
|
||||||
p.eat(EXCL);
|
p.eat(EXCL);
|
||||||
|
if p.at(IMPL_KW) {
|
||||||
|
p.error("expected type");
|
||||||
|
} else {
|
||||||
types::type_(p);
|
types::type_(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
if p.eat(FOR_KW) {
|
if p.eat(FOR_KW) {
|
||||||
types::type_(p);
|
types::type_(p);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user