diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-30 18:32:24 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-30 18:32:24 +0000 |
commit | 46cce4f8f1b71458029ebfd391c37e27cc6c5c9c (patch) | |
tree | 95344947f1957d03edcbcd6ef8a2786cc1b9142d /crates/ra_syntax/src/algo/mod.rs | |
parent | bc4de7128f474f75a9eff6591923657025099b74 (diff) | |
parent | 1643d94a65a66f32b9278829dd3af00883f3852b (diff) |
Merge #169
169: Syntax ptr r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/algo/mod.rs')
-rw-r--r-- | crates/ra_syntax/src/algo/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/algo/mod.rs b/crates/ra_syntax/src/algo/mod.rs index d82c42b3e..f92529d3e 100644 --- a/crates/ra_syntax/src/algo/mod.rs +++ b/crates/ra_syntax/src/algo/mod.rs | |||
@@ -2,7 +2,7 @@ pub mod visit; | |||
2 | // pub mod walk; | 2 | // pub mod walk; |
3 | 3 | ||
4 | use crate::{ | 4 | use crate::{ |
5 | text_utils::{contains_offset_nonstrict, is_subrange}, | 5 | text_utils::{contains_offset_nonstrict}, |
6 | SyntaxNodeRef, TextRange, TextUnit, | 6 | SyntaxNodeRef, TextRange, TextUnit, |
7 | }; | 7 | }; |
8 | 8 | ||
@@ -91,7 +91,7 @@ impl<'f> Iterator for LeafAtOffset<'f> { | |||
91 | 91 | ||
92 | pub fn find_covering_node(root: SyntaxNodeRef, range: TextRange) -> SyntaxNodeRef { | 92 | pub fn find_covering_node(root: SyntaxNodeRef, range: TextRange) -> SyntaxNodeRef { |
93 | assert!( | 93 | assert!( |
94 | is_subrange(root.range(), range), | 94 | range.is_subrange(&root.range()), |
95 | "node range: {:?}, target range: {:?}", | 95 | "node range: {:?}, target range: {:?}", |
96 | root.range(), | 96 | root.range(), |
97 | range, | 97 | range, |