mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Add fix for incorrect case diagnostic
This commit is contained in:
parent
17f1026c46
commit
e24e22f288
8 changed files with 112 additions and 30 deletions
|
@ -23,6 +23,10 @@ impl SyntaxNodePtr {
|
|||
SyntaxNodePtr { range: node.text_range(), kind: node.kind() }
|
||||
}
|
||||
|
||||
pub fn text_range(&self) -> TextRange {
|
||||
self.range.clone()
|
||||
}
|
||||
|
||||
pub fn to_node(&self, root: &SyntaxNode) -> SyntaxNode {
|
||||
assert!(root.parent().is_none());
|
||||
successors(Some(root.clone()), |node| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue