diff options
Diffstat (limited to 'tests/ui/mir/static-by-value-slice.rs')
| -rw-r--r-- | tests/ui/mir/static-by-value-slice.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/mir/static-by-value-slice.rs b/tests/ui/mir/static-by-value-slice.rs new file mode 100644 index 00000000000..af98be6a74d --- /dev/null +++ b/tests/ui/mir/static-by-value-slice.rs @@ -0,0 +1,10 @@ +//! Regression test for #140332 +//! KnownPanicsLint used to assert ABI compatibility in the interpreter, +//! which ICEs with unsized statics. + +static mut S: [i8] = ["Some thing"; 1]; +//~^ ERROR the size for values of type `[i8]` cannot be known + +fn main() { + assert_eq!(S, [0; 1]); +} |
