aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/tests
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-27 10:22:09 +0100
committerAleksey Kladov <[email protected]>2018-08-27 10:22:09 +0100
commit07cbb7d73deed8dac3eecdbdc7e1eaf6938a6cd6 (patch)
tree4a1fa22fa8c908f0c3c9489a98aa2479f05def59 /crates/libeditor/tests
parentc16530c988e817c5596fa38ebe9e12a302886a8f (diff)
Support if-let in scopes
Diffstat (limited to 'crates/libeditor/tests')
-rw-r--r--crates/libeditor/tests/test.rs13
1 files changed, 13 insertions, 0 deletions
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) {
273} 273}
274", r#"[CompletionItem { name: "y" }, 274", r#"[CompletionItem { name: "y" },
275 CompletionItem { name: "x" }]"#); 275 CompletionItem { name: "x" }]"#);
276
277 do_check(r"
278fn quux() {
279 if let Some(x) = foo() {
280 let y = 92;
281 };
282 if let Some(a) = bar() {
283 let b = 62;
284 1 + <|>
285 }
286}
287", r#"[CompletionItem { name: "b" },
288 CompletionItem { name: "a" }]"#);
276} 289}
277 290
278fn file(text: &str) -> File { 291fn file(text: &str) -> File {