aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/tests.rs12
-rw-r--r--crates/ra_hir/src/ty/tests/data/literals.txt4
2 files changed, 12 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index cbdb2a4b7..8aacb1a7f 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -135,7 +135,7 @@ fn test(a: &u32, b: &mut u32, c: *const u32, d: *mut u32) {
135#[test] 135#[test]
136fn infer_literals() { 136fn infer_literals() {
137 check_inference( 137 check_inference(
138 r#" 138 r##"
139fn test() { 139fn test() {
140 5i32; 140 5i32;
141 "hello"; 141 "hello";
@@ -146,8 +146,14 @@ fn test() {
146 5000; 146 5000;
147 false; 147 false;
148 true; 148 true;
149} 149 r#"
150"#, 150 //! doc
151 // non-doc
152 mod foo {}
153 "#;
154 br#"yolo"#;
155}
156"##,
151 "literals.txt", 157 "literals.txt",
152 ); 158 );
153} 159}
diff --git a/crates/ra_hir/src/ty/tests/data/literals.txt b/crates/ra_hir/src/ty/tests/data/literals.txt
index 6e82f458f..84ee2c11b 100644
--- a/crates/ra_hir/src/ty/tests/data/literals.txt
+++ b/crates/ra_hir/src/ty/tests/data/literals.txt
@@ -1,4 +1,4 @@
1[11; 111) '{ ...rue; }': () 1[11; 201) '{ ...o"#; }': ()
2[17; 21) '5i32': i32 2[17; 21) '5i32': i32
3[27; 34) '"hello"': &str 3[27; 34) '"hello"': &str
4[40; 48) 'b"bytes"': &[u8] 4[40; 48) 'b"bytes"': &[u8]
@@ -8,3 +8,5 @@
8[83; 87) '5000': i32 8[83; 87) '5000': i32
9[93; 98) 'false': bool 9[93; 98) 'false': bool
10[104; 108) 'true': bool 10[104; 108) 'true': bool
11[114; 182) 'r#" ... "#': &str
12[188; 198) 'br#"yolo"#': &[u8]