summary refs log tree commit diff
path: root/tests/ui/mir/static-by-value-slice.rs
blob: af98be6a74d6ce29b424a3253571575d05ef7c28 (plain)
1
2
3
4
5
6
7
8
9
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]);
}