From d67eabb512a08a451a649c7f20e4e9ae1860a8a0 Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Mon, 14 Jan 2019 20:56:14 +0100 Subject: Fix type inference for raw (byte) strings --- crates/ra_ide_api/src/hover.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api/src') 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 { assert_eq!("[unknown]", &type_name); } - // FIXME: improve type_of to make this work #[test] fn test_type_of_for_expr_2() { let (analysis, range) = single_file_with_range( " fn main() { let foo: usize = 1; - let bar = <|>1 + foo_test<|>; + let bar = <|>1 + foo<|>; } ", ); let type_name = analysis.type_of(range).unwrap().unwrap(); - assert_eq!("[unknown]", &type_name); + assert_eq!("usize", &type_name); } } -- cgit v1.2.3