mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-12 05:16:33 +00:00
feat: allow attributes on all expressions
Attrs are syntactically valid on any expression, even if they are not allowed semantically everywhere yet.
This commit is contained in:
parent
7dc331faef
commit
56964c9bd3
20 changed files with 303 additions and 335 deletions
|
@ -339,7 +339,7 @@ impl CompletedMarker {
|
|||
}
|
||||
|
||||
/// Extends this completed marker *to the left* up to `m`.
|
||||
pub(crate) fn extend_to(self, p: &mut Parser, mut m: Marker) {
|
||||
pub(crate) fn extend_to(self, p: &mut Parser, mut m: Marker) -> CompletedMarker {
|
||||
m.bomb.defuse();
|
||||
let idx = m.pos as usize;
|
||||
match &mut p.events[idx] {
|
||||
|
@ -348,6 +348,7 @@ impl CompletedMarker {
|
|||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
self
|
||||
}
|
||||
|
||||
pub(crate) fn kind(&self) -> SyntaxKind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue