From 86a67dce25f11ba9803a5727f77c02fd1f49e2c0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Feb 2019 16:48:06 +0300 Subject: fix tests --- crates/ra_syntax/src/parsing/reparsing.rs | 8 +++++--- crates/ra_syntax/src/syntax_kinds.rs | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'crates/ra_syntax/src') diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index a88f53dae..edf3fa291 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs @@ -79,10 +79,12 @@ fn is_contextual_kw(text: &str) -> bool { } } -type ParseFn = fn(&mut Parser); -fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(&SyntaxNode, ParseFn)> { +fn find_reparsable_node( + node: &SyntaxNode, + range: TextRange, +) -> Option<(&SyntaxNode, fn(&mut Parser))> { let node = algo::find_covering_node(node, range); - node.ancestors().find_map(grammar::reparser).map(|r| (node, r)) + node.ancestors().find_map(|node| grammar::reparser(node).map(|r| (node, r))) } fn is_balanced(tokens: &[Token]) -> bool { diff --git a/crates/ra_syntax/src/syntax_kinds.rs b/crates/ra_syntax/src/syntax_kinds.rs index d53886676..c1118c5ab 100644 --- a/crates/ra_syntax/src/syntax_kinds.rs +++ b/crates/ra_syntax/src/syntax_kinds.rs @@ -1,8 +1,9 @@ mod generated; -use crate::SyntaxKind::*; use std::fmt; +use crate::SyntaxKind::*; + pub use self::generated::SyntaxKind; impl fmt::Debug for SyntaxKind { -- cgit v1.2.3