Parse bare dyn types with leading lifetime

This commit is contained in:
Ryo Yoshida 2023-05-05 04:08:58 +09:00
parent 0dd94d3b07
commit 2a509d0eb2
No known key found for this signature in database
GPG key ID: E25698A930586171
4 changed files with 72 additions and 1 deletions

View file

@ -35,7 +35,7 @@ const GENERIC_ARG_FIRST: TokenSet = TokenSet::new(&[
// type T = S<i32>;
fn generic_arg(p: &mut Parser<'_>) -> bool {
match p.current() {
LIFETIME_IDENT => lifetime_arg(p),
LIFETIME_IDENT if !p.nth_at(1, T![+]) => lifetime_arg(p),
T!['{'] | T![true] | T![false] | T![-] => const_arg(p),
k if k.is_literal() => const_arg(p),
// test associated_type_bounds