From 44e9a9605b2b3916669182ba091599d59653c497 Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Thu, 17 Jan 2019 13:40:45 +0100 Subject: Fixup annotated bindings --- crates/ra_hir/src/ty/tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 e817a8da9..fc4054159 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs @@ -359,7 +359,7 @@ fn test(x: &str, y: isize) { } #[test] -fn infer_simple_pattern() { +fn infer_pattern() { check_inference( r#" fn test(x: &i32) { @@ -381,6 +381,7 @@ fn test(x: &i32) { let ref ref_to_x = x; let mut mut_x = x; let ref mut mut_ref_to_x = x; + let k = mut_ref_to_x; } "#, "pattern.txt", @@ -408,6 +409,9 @@ fn test() { E::A { x } => x, E::B => 1, }; + + let ref d @ E::A { .. } = e; + d; } "#, "adt_pattern.txt", -- cgit v1.2.3