about summary refs log tree commit diff
path: root/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.rs
blob: 5ca4f49c3bac5018fe43c265deae7a84b1b3b7b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Regression test for issue #121612

trait Trait {}
impl Trait for bool {}
struct MySlice<T: FnOnce(&T, Idx) -> Idx>(bool, T);
//~^ ERROR cannot find type `Idx` in this scope
//~| ERROR cannot find type `Idx` in this scope
type MySliceBool = MySlice<[bool]>;
const MYSLICE_GOOD: &MySliceBool = &MySlice(true, [false]);
//~^ ERROR the size for values of type `[bool]` cannot be known at compilation time
//~| ERROR the size for values of type `[bool]` cannot be known at compilation time

fn main() {}