Unnamed repository; edit this file 'description' to name the repository.
Merge #10506
10506: Add comment r=lnicola a=k-nasa ## Why This code looks logic-bug ... https://github.com/rust-analyzer/rust-analyzer/blob/ce86534e1cb22685e83c3f91ea89025edbfcbc98/crates/syntax/src/syntax_node.rs#L50 However, this code has been intentionally disabled. It's a good idea to write a comment ref: https://github.com/rust-analyzer/rust-analyzer/pull/10357 ## What - I added comment Co-authored-by: k-nasa <[email protected]>
bors[bot] 2021-10-10
parent 64ca0f6 · parent 84bc6e1 · commit 4439cd8
-rw-r--r--crates/syntax/src/syntax_node.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/syntax/src/syntax_node.rs b/crates/syntax/src/syntax_node.rs
index bd7ea0240b..c95c76c0a8 100644
--- a/crates/syntax/src/syntax_node.rs
+++ b/crates/syntax/src/syntax_node.rs
@@ -47,6 +47,7 @@ impl SyntaxTreeBuilder {
pub fn finish(self) -> Parse<SyntaxNode> {
let (green, errors) = self.finish_raw();
+ // Disable block validation, see https://github.com/rust-analyzer/rust-analyzer/pull/10357
if cfg!(debug_assertions) && false {
let node = SyntaxNode::new_root(green.clone());
crate::validation::validate_block_structure(&node);