From f1188f7afe28ae1450faf196da56845af116bf3d Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Fri, 20 Mar 2020 18:37:57 +0100 Subject: [PATCH 1/2] Add test for issue #53275 --- src/test/ui/issues/issue-53275.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/test/ui/issues/issue-53275.rs diff --git a/src/test/ui/issues/issue-53275.rs b/src/test/ui/issues/issue-53275.rs new file mode 100644 index 00000000000..b50a8f6dca0 --- /dev/null +++ b/src/test/ui/issues/issue-53275.rs @@ -0,0 +1,8 @@ +// run-pass + +#![crate_type = "lib"] +struct S(u8); + +pub fn ice() { + S([][0]); +} From 821eef5a4885edecd06415756a11538231c6152a Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Mon, 23 Mar 2020 11:11:54 +0100 Subject: [PATCH 2/2] Make sure issue 53275 test goes through codegen --- src/test/ui/issues/issue-53275.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/ui/issues/issue-53275.rs b/src/test/ui/issues/issue-53275.rs index b50a8f6dca0..5ae6fb2d472 100644 --- a/src/test/ui/issues/issue-53275.rs +++ b/src/test/ui/issues/issue-53275.rs @@ -1,6 +1,7 @@ -// run-pass +// build-pass #![crate_type = "lib"] +#![allow(unconditional_panic)] struct S(u8); pub fn ice() {