generate testsuite for impl_type
This commit is contained in:
@@ -57,7 +57,7 @@ pub(super) fn impl_item(p: &mut Parser) {
|
||||
p.eat(EXCL);
|
||||
impl_type(p);
|
||||
if p.eat(FOR_KW) {
|
||||
types::type_(p);
|
||||
impl_type(p);
|
||||
}
|
||||
type_params::opt_where_clause(p);
|
||||
if p.at(L_CURLY) {
|
||||
@@ -116,10 +116,11 @@ fn choose_type_params_over_qpath(p: &Parser) -> bool {
|
||||
&& (p.nth(2) == R_ANGLE || p.nth(2) == COMMA || p.nth(2) == COLON || p.nth(2) == EQ)
|
||||
}
|
||||
|
||||
// test impl_type
|
||||
// impl Type {}
|
||||
// ^^^^
|
||||
// impl Trait for T {}
|
||||
// ^^^^^
|
||||
// impl Trait1 for T {}
|
||||
// impl impl NotType {}
|
||||
// impl Trait2 for impl NotType {}
|
||||
pub(crate) fn impl_type(p: &mut Parser) {
|
||||
if p.at(IMPL_KW) {
|
||||
p.error("expected trait or type");
|
||||
@@ -128,4 +129,3 @@ pub(crate) fn impl_type(p: &mut Parser) {
|
||||
types::type_(p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user