From 829f668bd7aeabcc7a44c5c02ef7152790dd297c Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Sun, 13 Jan 2019 20:51:05 +0900 Subject: Add infer tuple test --- crates/ra_hir/src/ty/tests.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crates/ra_hir/src/ty/tests.rs') 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) { ); } +#[test] +fn infer_tuple() { + check_inference( + r#" +fn test() { + let a: (u32, &str) = (1, "a"); +} +"#, + "tuple.txt", + ); +} + fn infer(content: &str) -> String { let (db, _, file_id) = MockDatabase::with_single_file(content); let source_file = db.source_file(file_id); -- cgit v1.2.3