mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 09:53:26 +00:00
reject impl keyword in impl header
This commit is contained in:
parent
e446316585
commit
cacb32d88a
@ -54,8 +54,16 @@ pub(super) fn impl_item(p: &mut Parser) {
|
||||
|
||||
// test impl_item_neg
|
||||
// impl !Send for X {}
|
||||
p.eat(EXCL);
|
||||
types::type_(p);
|
||||
if p.at(IMPL_KW) {
|
||||
p.error("expected type");
|
||||
} else {
|
||||
p.eat(EXCL);
|
||||
if p.at(IMPL_KW) {
|
||||
p.error("expected type");
|
||||
} else {
|
||||
types::type_(p);
|
||||
}
|
||||
}
|
||||
if p.eat(FOR_KW) {
|
||||
types::type_(p);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user