about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-10 07:56:47 +0000
committerGitHub <noreply@github.com>2021-10-10 07:56:47 +0000
commit4439cd8c68f351f46dfaa7e8e534479ebe4cd94d (patch)
tree3277323cbe6e9d402f85778be8937e0cfd46d174
parent64ca0f63bfd513fa40d1973077972079ead51ef2 (diff)
parent84bc6e159a83688eab3f555053dcd735e2119c8a (diff)
downloadrust-4439cd8c68f351f46dfaa7e8e534479ebe4cd94d.tar.gz
rust-4439cd8c68f351f46dfaa7e8e534479ebe4cd94d.zip
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 <htilcs1115@gmail.com>
-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 bd7ea0240b9..c95c76c0a8e 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);