mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
make ancestors and descendants inherent
This commit is contained in:
parent
dccaa5e45e
commit
d323c81d5c
14 changed files with 40 additions and 46 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::fmt::Write;
|
||||
use {
|
||||
algo::walk::{preorder, walk, WalkEvent},
|
||||
algo::walk::{walk, WalkEvent},
|
||||
SyntaxKind, File, SyntaxNodeRef
|
||||
};
|
||||
|
||||
|
@ -56,7 +56,7 @@ pub fn check_fuzz_invariants(text: &str) {
|
|||
|
||||
pub(crate) fn validate_block_structure(root: SyntaxNodeRef) {
|
||||
let mut stack = Vec::new();
|
||||
for node in preorder(root) {
|
||||
for node in root.descendants() {
|
||||
match node.kind() {
|
||||
SyntaxKind::L_CURLY => {
|
||||
stack.push(node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue