diff options
author | Hirokazu Hata <[email protected]> | 2019-01-13 11:51:05 +0000 |
---|---|---|
committer | Hirokazu Hata <[email protected]> | 2019-01-13 12:04:03 +0000 |
commit | 829f668bd7aeabcc7a44c5c02ef7152790dd297c (patch) | |
tree | 6a0014459ff32608adaabd3718cfc9c732444589 /crates/ra_hir/src/ty/tests.rs | |
parent | 0199572a3d06ff66eeae85a2d2c9762996f0d2d8 (diff) |
Add infer tuple test
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 1c3129441..4031cd735 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -268,6 +268,18 @@ fn test(a: A) { | |||
268 | ); | 268 | ); |
269 | } | 269 | } |
270 | 270 | ||
271 | #[test] | ||
272 | fn infer_tuple() { | ||
273 | check_inference( | ||
274 | r#" | ||
275 | fn test() { | ||
276 | let a: (u32, &str) = (1, "a"); | ||
277 | } | ||
278 | "#, | ||
279 | "tuple.txt", | ||
280 | ); | ||
281 | } | ||
282 | |||
271 | fn infer(content: &str) -> String { | 283 | fn infer(content: &str) -> String { |
272 | let (db, _, file_id) = MockDatabase::with_single_file(content); | 284 | let (db, _, file_id) = MockDatabase::with_single_file(content); |
273 | let source_file = db.source_file(file_id); | 285 | let source_file = db.source_file(file_id); |