aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation/char.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/validation/char.rs')
-rw-r--r--crates/ra_syntax/src/validation/char.rs8
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
17pub(super) fn validate_char_node(node: ast::Char, errors: &mut Vec<SyntaxError>) { 17pub(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)]
177mod test { 177mod 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) {