diff options
| author | Ralf Jung <post@ralfj.de> | 2023-04-27 12:22:21 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-04-28 14:42:03 +0200 |
| commit | 25e9b79060d67f1ac0dc2315ff627b6359192bfc (patch) | |
| tree | 1c3d8482d9bb812b36263c7ee79771f694f164d4 /tests/ui/const_prop | |
| parent | 8b8110e1469d459a196f6feb60d82dec48c3cfc2 (diff) | |
| download | rust-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.rs | 9 |
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() {} |
