mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Merge branch 'master' into feature/issue/1856
# Conflicts: # crates/ra_assists/src/ast_editor.rs
This commit is contained in:
commit
81efd696cc
53 changed files with 1180 additions and 957 deletions
|
@ -24,8 +24,23 @@ fn attribute(p: &mut Parser, inner: bool) {
|
|||
p.bump(T![!]);
|
||||
}
|
||||
|
||||
if p.at(T!['[']) {
|
||||
items::token_tree(p);
|
||||
if p.eat(T!['[']) {
|
||||
paths::use_path(p);
|
||||
|
||||
match p.current() {
|
||||
T![=] => {
|
||||
p.bump(T![=]);
|
||||
if expressions::literal(p).is_none() {
|
||||
p.error("expected literal");
|
||||
}
|
||||
}
|
||||
T!['('] | T!['['] | T!['{'] => items::token_tree(p),
|
||||
_ => {}
|
||||
}
|
||||
|
||||
if !p.eat(T![']']) {
|
||||
p.error("expected `]`");
|
||||
}
|
||||
} else {
|
||||
p.error("expected `[`");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue