]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/array-to-slice-cast.rs
Rollup merge of #106951 - tmiasko:rm-simplify-initial, r=oli-obk
[rust.git] / tests / ui / consts / array-to-slice-cast.rs
1 // check-pass
2
3 fn main() {}
4
5 const fn foo() {
6     let x = [1, 2, 3, 4, 5];
7     let y: &[_] = &x;
8
9     struct Foo<T: ?Sized>(bool, T);
10
11     let x: Foo<[u8; 3]> = Foo(true, [1, 2, 3]);
12     let y: &Foo<[u8]> = &x;
13 }