From 84ff0013c25cd96995f61253b0b8da74e32d12ea Mon Sep 17 00:00:00 2001 From: ChinYing-Li Date: Wed, 21 Apr 2021 14:08:57 +0800 Subject: [PATCH] Add the case in duplicate issue (#4806) to the idempotent tests --- tests/source/issue-4312.rs | 14 ++++++++++++++ tests/target/issue-4312.rs | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/tests/source/issue-4312.rs b/tests/source/issue-4312.rs index 6d00867beab5..b36b0efdb9e2 100644 --- a/tests/source/issue-4312.rs +++ b/tests/source/issue-4312.rs @@ -1,3 +1,4 @@ +// issue 4312 fn main() { /* " */ println!("Hello, world!"); @@ -5,4 +6,17 @@ fn main() { println!("Hello, world!"); /* " abc */ println!("Hello, world!"); + let y = 4; + let x = match 1 + y == 3 { + True => 3, + False => 4, + /* " unreachable */ + }; +} + +// issue 4806 +enum X { + A, + B, + /*"*/ } diff --git a/tests/target/issue-4312.rs b/tests/target/issue-4312.rs index 6d00867beab5..b36b0efdb9e2 100644 --- a/tests/target/issue-4312.rs +++ b/tests/target/issue-4312.rs @@ -1,3 +1,4 @@ +// issue 4312 fn main() { /* " */ println!("Hello, world!"); @@ -5,4 +6,17 @@ fn main() { println!("Hello, world!"); /* " abc */ println!("Hello, world!"); + let y = 4; + let x = match 1 + y == 3 { + True => 3, + False => 4, + /* " unreachable */ + }; +} + +// issue 4806 +enum X { + A, + B, + /*"*/ }