Sign in
fuchsia
/
third_party
/
rust
/
fe6d626abcc6ca994f0554bb78858ccd2b33dcfd
/
.
/
src
/
test
/
ui
/
coercion
/
coercion-slice.rs
blob: 312b634c9fd0bab33d10d373a60dc423f98223d6 [
file
] [
log
] [
blame
]
// Tests that we forbid coercion from `[T; n]` to `&[T]`
fn
main
()
{
let
_
:
&[
i32
]
=
[
0
];
//~^ ERROR mismatched types
//~| expected type `&[i32]`
//~| expected &[i32], found array of 1 elements
}