aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
authorPhil Ellison <[email protected]>2019-07-28 18:41:29 +0100
committerPhil Ellison <[email protected]>2019-07-28 18:41:29 +0100
commit8e1a14a098b77b1be8888605f852eada029c816a (patch)
treef86d67ddaf75a60a7ff56ab7ff76f1f136b9f71f /crates/ra_assists/src
parent3e086528efd950e3051654daf9e62f339ef4a55c (diff)
Add failing test
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/add_explicit_type.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_assists/src/add_explicit_type.rs b/crates/ra_assists/src/add_explicit_type.rs
index 88970929f..7c6080640 100644
--- a/crates/ra_assists/src/add_explicit_type.rs
+++ b/crates/ra_assists/src/add_explicit_type.rs
@@ -69,6 +69,16 @@ mod tests {
69 ); 69 );
70 } 70 }
71 71
72 // https://github.com/rust-analyzer/rust-analyzer/issues/1592
73 #[test]
74 fn add_explicit_type_infers_correct_type_for_floating_point_literal() {
75 check_assist(
76 add_explicit_type,
77 "fn f() { let a<|> = 42f64; }",
78 "fn f() { let a<|>: f64 = 42f64; }",
79 );
80 }
81
72 #[test] 82 #[test]
73 fn add_explicit_type_not_applicable_if_ty_not_inferred() { 83 fn add_explicit_type_not_applicable_if_ty_not_inferred() {
74 check_assist_not_applicable(add_explicit_type, "fn f() { let a<|> = None; }"); 84 check_assist_not_applicable(add_explicit_type, "fn f() { let a<|> = None; }");