aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-14 19:56:14 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-14 19:56:14 +0000
commitd67eabb512a08a451a649c7f20e4e9ae1860a8a0 (patch)
tree99c5fb5004f3fb7a6b0855033855c439675cc0ff /crates/ra_ide_api
parent26893487722d07b3f31a6addfc88e6948620989c (diff)
Fix type inference for raw (byte) strings
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/hover.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs
index d73c5bc31..107b23833 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide_api/src/hover.rs
@@ -230,20 +230,19 @@ mod tests {
230 assert_eq!("[unknown]", &type_name); 230 assert_eq!("[unknown]", &type_name);
231 } 231 }
232 232
233 // FIXME: improve type_of to make this work
234 #[test] 233 #[test]
235 fn test_type_of_for_expr_2() { 234 fn test_type_of_for_expr_2() {
236 let (analysis, range) = single_file_with_range( 235 let (analysis, range) = single_file_with_range(
237 " 236 "
238 fn main() { 237 fn main() {
239 let foo: usize = 1; 238 let foo: usize = 1;
240 let bar = <|>1 + foo_test<|>; 239 let bar = <|>1 + foo<|>;
241 } 240 }
242 ", 241 ",
243 ); 242 );
244 243
245 let type_name = analysis.type_of(range).unwrap().unwrap(); 244 let type_name = analysis.type_of(range).unwrap().unwrap();
246 assert_eq!("[unknown]", &type_name); 245 assert_eq!("usize", &type_name);
247 } 246 }
248 247
249} 248}