diff --git a/tests/source/match.rs b/tests/source/match.rs index 7f15b88f4e9..ebae067b154 100644 --- a/tests/source/match.rs +++ b/tests/source/match.rs @@ -434,3 +434,11 @@ pub fn from_constval<'a>() -> 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 257a26d15ba..34d23630df6 100644 --- a/tests/target/match.rs +++ b/tests/target/match.rs @@ -475,3 +475,14 @@ pub fn from_constval<'a>() -> Const<'tcx> { }; } } + +// #2152 +fn issue_2152() { + match m { + "aaaaaaaaaaaaa" | "bbbbbbbbbbbbb" | "cccccccccccccccccccccccccccccccccccccccccccc" + if true => {} + "bind" | "writev" | "readv" | "sendmsg" | "recvmsg" if android && (aarch64 || x86_64) => { + true + } + } +}