summary refs log tree commit diff
path: root/tests/ui/mir/static-by-value-str.rs
blob: 88b72f90819090ccb9edc0864048586d1b187674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Regression test for #139872
//! KnownPanicsLint used to assert ABI compatibility in the interpreter,
//! which ICEs with unsized statics.

enum E {
    V16(u16),
    V32(u32),
}

static C: (E, u16, str) = (E::V16(0xDEAD), 0x600D, 0xBAD);
//~^ ERROR the size for values of type `str` cannot be known

pub fn main() {
    let (_, n, _) = C;
}