mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
parent
e4f7f1e1bd
commit
5f89a60f1a
6 changed files with 238 additions and 182 deletions
|
@ -13,7 +13,7 @@ pub(crate) fn validate_block_expr(block: ast::BlockExpr, errors: &mut Vec<Syntax
|
|||
_ => {}
|
||||
}
|
||||
}
|
||||
errors.extend(block.attrs().map(|attr| {
|
||||
errors.extend(block.attrs().filter(|attr| attr.kind().is_inner()).map(|attr| {
|
||||
SyntaxError::new(
|
||||
"A block in this position cannot accept inner attributes",
|
||||
attr.syntax().text_range(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue