From 07cbb7d73deed8dac3eecdbdc7e1eaf6938a6cd6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Aug 2018 12:22:09 +0300 Subject: Support if-let in scopes --- crates/libeditor/tests/test.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crates/libeditor/tests') diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs index 7979bfffe..d051980b0 100644 --- a/crates/libeditor/tests/test.rs +++ b/crates/libeditor/tests/test.rs @@ -273,6 +273,19 @@ fn quux(x: i32) { } ", r#"[CompletionItem { name: "y" }, CompletionItem { name: "x" }]"#); + + do_check(r" +fn quux() { + if let Some(x) = foo() { + let y = 92; + }; + if let Some(a) = bar() { + let b = 62; + 1 + <|> + } +} +", r#"[CompletionItem { name: "b" }, + CompletionItem { name: "a" }]"#); } fn file(text: &str) -> File { -- cgit v1.2.3