aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation/byte_string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/validation/byte_string.rs')
-rw-r--r--crates/ra_syntax/src/validation/byte_string.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/validation/byte_string.rs b/crates/ra_syntax/src/validation/byte_string.rs
index f7a4fb156..670c43a09 100644
--- a/crates/ra_syntax/src/validation/byte_string.rs
+++ b/crates/ra_syntax/src/validation/byte_string.rs
@@ -9,7 +9,7 @@ use crate::{
9 9
10use super::byte; 10use super::byte;
11 11
12pub(crate) fn validate_byte_string_node(node: ast::ByteString, errors: &mut Vec<SyntaxError>) { 12pub(crate) fn validate_byte_string_node(node: &ast::ByteString, errors: &mut Vec<SyntaxError>) {
13 let literal_text = node.text(); 13 let literal_text = node.text();
14 let literal_range = node.syntax().range(); 14 let literal_range = node.syntax().range();
15 let mut components = string_lexing::parse_byte_string_literal(literal_text); 15 let mut components = string_lexing::parse_byte_string_literal(literal_text);
@@ -43,12 +43,12 @@ pub(crate) fn validate_byte_string_node(node: ast::ByteString, errors: &mut Vec<
43 43
44#[cfg(test)] 44#[cfg(test)]
45mod test { 45mod test {
46 use crate::SourceFileNode; 46 use crate::{SourceFile, TreePtr};
47 47
48 fn build_file(literal: &str) -> SourceFileNode { 48 fn build_file(literal: &str) -> TreePtr<SourceFile> {
49 let src = format!(r#"const S: &'static [u8] = b"{}";"#, literal); 49 let src = format!(r#"const S: &'static [u8] = b"{}";"#, literal);
50 println!("Source: {}", src); 50 println!("Source: {}", src);
51 SourceFileNode::parse(&src) 51 SourceFile::parse(&src)
52 } 52 }
53 53
54 fn assert_valid_str(literal: &str) { 54 fn assert_valid_str(literal: &str) {