diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-08 09:05:55 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-08 09:05:55 +0000 |
commit | 3f4be819125ce4a22edd86721fa56b5caba99c2e (patch) | |
tree | be93895ddc08c911585d9f7bc64623a3741f32c6 /crates/ra_syntax/src/validation/char.rs | |
parent | 4e444d2bc24d16284401444fd2154f63e0f96070 (diff) | |
parent | 122410d7aa34a32d468a3173858cbc8a2bbc68f5 (diff) |
Merge #449
449: switch to new rowan API r=matklad a=matklad
closes https://github.com/rust-analyzer/rust-analyzer/issues/448
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/validation/char.rs')
-rw-r--r-- | crates/ra_syntax/src/validation/char.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs index 1d6fe8837..9cbd43fba 100644 --- a/crates/ra_syntax/src/validation/char.rs +++ b/crates/ra_syntax/src/validation/char.rs | |||
@@ -14,7 +14,7 @@ use crate::{ | |||
14 | }, | 14 | }, |
15 | }; | 15 | }; |
16 | 16 | ||
17 | pub(super) fn validate_char_node(node: ast::Char, errors: &mut Vec<SyntaxError>) { | 17 | pub(super) fn validate_char_node(node: &ast::Char, errors: &mut Vec<SyntaxError>) { |
18 | let literal_text = node.text(); | 18 | let literal_text = node.text(); |
19 | let literal_range = node.syntax().range(); | 19 | let literal_range = node.syntax().range(); |
20 | let mut components = string_lexing::parse_char_literal(literal_text); | 20 | let mut components = string_lexing::parse_char_literal(literal_text); |
@@ -175,11 +175,11 @@ fn validate_unicode_escape(text: &str, range: TextRange, errors: &mut Vec<Syntax | |||
175 | 175 | ||
176 | #[cfg(test)] | 176 | #[cfg(test)] |
177 | mod test { | 177 | mod test { |
178 | use crate::SourceFileNode; | 178 | use crate::{SourceFile, TreePtr}; |
179 | 179 | ||
180 | fn build_file(literal: &str) -> SourceFileNode { | 180 | fn build_file(literal: &str) -> TreePtr<SourceFile> { |
181 | let src = format!("const C: char = '{}';", literal); | 181 | let src = format!("const C: char = '{}';", literal); |
182 | SourceFileNode::parse(&src) | 182 | SourceFile::parse(&src) |
183 | } | 183 | } |
184 | 184 | ||
185 | fn assert_valid_char(literal: &str) { | 185 | fn assert_valid_char(literal: &str) { |