From a1c187eef3ba08076aedb5154929f7eda8d1b424 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 18:26:51 +0200 Subject: Rename ra_syntax -> syntax --- crates/ra_syntax/src/validation/block.rs | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 crates/ra_syntax/src/validation/block.rs (limited to 'crates/ra_syntax/src/validation') diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs deleted file mode 100644 index ad9901468..000000000 --- a/crates/ra_syntax/src/validation/block.rs +++ /dev/null @@ -1,22 +0,0 @@ -//! Logic for validating block expressions i.e. `ast::BlockExpr`. - -use crate::{ - ast::{self, AstNode, AttrsOwner}, - SyntaxError, - SyntaxKind::*, -}; - -pub(crate) fn validate_block_expr(block: ast::BlockExpr, errors: &mut Vec) { - if let Some(parent) = block.syntax().parent() { - match parent.kind() { - FN | EXPR_STMT | BLOCK_EXPR => return, - _ => {} - } - } - errors.extend(block.attrs().map(|attr| { - SyntaxError::new( - "A block in this position cannot accept inner attributes", - attr.syntax().text_range(), - ) - })) -} -- cgit v1.2.3