Merge branch 'master' into feature/issue/1856

# Conflicts:
#	crates/ra_assists/src/ast_editor.rs
This commit is contained in:
Alexander Andreev 2019-09-30 12:07:26 +03:00
commit 81efd696cc
53 changed files with 1180 additions and 957 deletions

View file

@ -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 `[`");
}