diff options
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); |