From 5f89a60f1a0feab1e2e0dd37e642877552675da4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 19 Apr 2021 17:11:49 +0300 Subject: fix: false positive about inner attrs in docs closes #8541 --- crates/syntax/src/validation/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/syntax/src/validation') diff --git a/crates/syntax/src/validation/block.rs b/crates/syntax/src/validation/block.rs index ad9901468..40170014f 100644 --- a/crates/syntax/src/validation/block.rs +++ b/crates/syntax/src/validation/block.rs @@ -13,7 +13,7 @@ pub(crate) fn validate_block_expr(block: ast::BlockExpr, errors: &mut Vec {} } } - 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(), -- cgit v1.2.3