From 792f48c976f006d75229a52441f1a3604c2d0335 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Mon, 30 Oct 2017 23:31:08 +0900 Subject: [PATCH] Add a test for #2099 --- tests/source/match.rs | 10 ++++++++++ tests/target/match.rs | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/tests/source/match.rs b/tests/source/match.rs index 527ceea06ef..48a710e6f06 100644 --- a/tests/source/match.rs +++ b/tests/source/match.rs @@ -415,3 +415,13 @@ fn match_with_trailing_spaces() { None => 1, } } + +fn issue_2099() { + let a = match x { +}; + let b = match x { + + }; + + match x {} +} diff --git a/tests/target/match.rs b/tests/target/match.rs index e42b1e3428b..3d879d18c20 100644 --- a/tests/target/match.rs +++ b/tests/target/match.rs @@ -456,3 +456,10 @@ fn match_with_trailing_spaces() { None => 1, } } + +fn issue_2099() { + let a = match x {}; + let b = match x {}; + + match x {} +}