From 00318c400b3dfa26ed698e03149ef67a17f080cb Mon Sep 17 00:00:00 2001 From: topecongiro Date: Wed, 15 Nov 2017 10:36:42 +0900 Subject: [PATCH] Add a test for #2152 --- tests/source/match.rs | 8 ++++++++ tests/target/match.rs | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/tests/source/match.rs b/tests/source/match.rs index 7f15b88f4e9b..ebae067b1543 100644 --- a/tests/source/match.rs +++ b/tests/source/match.rs @@ -434,3 +434,11 @@ impl<'tcx> Const<'tcx> { }; } } + +// #2152 +fn issue_2152() { + match m { + "aaaaaaaaaaaaa" | "bbbbbbbbbbbbb" | "cccccccccccccccccccccccccccccccccccccccccccc" if true => {} + "bind" | "writev" | "readv" | "sendmsg" | "recvmsg" if android && (aarch64 || x86_64) => true, + } +} diff --git a/tests/target/match.rs b/tests/target/match.rs index 257a26d15ba7..34d23630df61 100644 --- a/tests/target/match.rs +++ b/tests/target/match.rs @@ -475,3 +475,14 @@ impl<'tcx> Const<'tcx> { }; } } + +// #2152 +fn issue_2152() { + match m { + "aaaaaaaaaaaaa" | "bbbbbbbbbbbbb" | "cccccccccccccccccccccccccccccccccccccccccccc" + if true => {} + "bind" | "writev" | "readv" | "sendmsg" | "recvmsg" if android && (aarch64 || x86_64) => { + true + } + } +}