We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e4bdc14 + ddd8116 commit 7ae247fCopy full SHA for 7ae247f
crates/ra_syntax/src/syntax_node.rs
@@ -48,11 +48,11 @@ impl SyntaxTreeBuilder {
48
49
pub fn finish(self) -> Parse<SyntaxNode> {
50
let (green, errors) = self.finish_raw();
51
- let node = SyntaxNode::new_root(green);
52
if cfg!(debug_assertions) {
+ let node = SyntaxNode::new_root(green.clone());
53
crate::validation::validate_block_structure(&node);
54
}
55
- Parse::new(node.green().clone(), errors)
+ Parse::new(green, errors)
56
57
58
pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) {
0 commit comments