From ad05b32fee4d9ed08581fabb5c4554f00819b917 Mon Sep 17 00:00:00 2001 From: inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com> Date: Fri, 23 Sep 2022 03:09:16 -0700 Subject: [PATCH] Add regression test for issue #100878 --- src/test/ui/consts/const-eval/issue-100878.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/test/ui/consts/const-eval/issue-100878.rs diff --git a/src/test/ui/consts/const-eval/issue-100878.rs b/src/test/ui/consts/const-eval/issue-100878.rs new file mode 100644 index 0000000000000..353ce5050359c --- /dev/null +++ b/src/test/ui/consts/const-eval/issue-100878.rs @@ -0,0 +1,8 @@ +// This checks that the const-eval ICE in issue #100878 does not recur. +// +// build-pass +pub fn bitshift_data(data: [u8; 1]) -> u8 { + data[0] << 8 +} + +fn main() {}