blob: 0b8ec7dc07a7396889e12661100dc4f77233db15 [file] [log] [blame]
//! Regression test to check that literal expressions in a struct field can be coerced to the
//! expected field type, including block expressions.
//!
//! Issue: <https://github.com/rust-lang/rust/issues/31260>
//@ check-pass
pub struct Struct<K: 'static> {
pub field: K,
}
static STRUCT: Struct<&'static [u8]> = Struct { field: { &[1] } };
static STRUCT2: Struct<&'static [u8]> = Struct { field: &[1] };
fn main() {}