about summary refs log tree commit diff
path: root/tests/ui/const_prop
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-04-27 12:22:21 +0200
committerRalf Jung <post@ralfj.de>2023-04-28 14:42:03 +0200
commit25e9b79060d67f1ac0dc2315ff627b6359192bfc (patch)
tree1c3d8482d9bb812b36263c7ee79771f694f164d4 /tests/ui/const_prop
parent8b8110e1469d459a196f6feb60d82dec48c3cfc2 (diff)
downloadrust-25e9b79060d67f1ac0dc2315ff627b6359192bfc.tar.gz
rust-25e9b79060d67f1ac0dc2315ff627b6359192bfc.zip
interpret: fail more gracefully on uninit unsized locals
Diffstat (limited to 'tests/ui/const_prop')
-rw-r--r--tests/ui/const_prop/unsized-local-ice.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/const_prop/unsized-local-ice.rs b/tests/ui/const_prop/unsized-local-ice.rs
new file mode 100644
index 00000000000..c725b3238ea
--- /dev/null
+++ b/tests/ui/const_prop/unsized-local-ice.rs
@@ -0,0 +1,9 @@
+// build-pass
+//! Regression test for <https://github.com/rust-lang/rust/issues/68538>.
+#![feature(unsized_fn_params)]
+
+pub fn take_unsized_slice(s: [u8]) {
+    s[0];
+}
+
+fn main() {}