]> git.proxmox.com Git - rustc.git/blob - tests/ui/coercion/coercion-slice.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / coercion / coercion-slice.rs
1 // Tests that we forbid coercion from `[T; n]` to `&[T]`
2
3 fn main() {
4 let _: &[i32] = [0];
5 //~^ ERROR mismatched types
6 //~| expected `&[i32]`, found array `[{integer}; 1]`
7 }