mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Parse contextual dyn keyword properly in edition 2015
This commit is contained in:
parent
9fd6c695da
commit
f4199f786e
10 changed files with 164 additions and 11 deletions
|
@ -65,9 +65,8 @@ pub(crate) fn to_parser_input<S: Copy + fmt::Debug>(
|
|||
i if i.starts_with('\'') => res.push(LIFETIME_IDENT),
|
||||
_ if ident.is_raw.yes() => res.push(IDENT),
|
||||
"gen" if !edition.at_least_2024() => res.push(IDENT),
|
||||
"async" | "await" | "dyn" | "try" if !edition.at_least_2018() => {
|
||||
res.push(IDENT)
|
||||
}
|
||||
"dyn" if !edition.at_least_2018() => res.push_ident(DYN_KW),
|
||||
"async" | "await" | "try" if !edition.at_least_2018() => res.push(IDENT),
|
||||
text => match SyntaxKind::from_keyword(text) {
|
||||
Some(kind) => res.push(kind),
|
||||
None => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue