rust/tests/ui/trait-bounds/ice-unsized-struct-arg-issue2-121424.rs
Gurinder Singh b1f4657fe9 Add missing regression tests
for a couple of issues
2024-03-09 12:01:19 +05:30

10 lines
310 B
Rust

// Regression test for issue #121424
#[repr(C)]
struct MySlice<T: Copy>(bool, T);
type MySliceBool = MySlice<[bool]>;
const MYSLICE_GOOD: &MySliceBool = &MySlice(true, [false]);
//~^ ERROR the trait bound `[bool]: Copy` is not satisfied
//~| ERROR the trait bound `[bool]: Copy` is not satisfied
fn main() {}