Sign in
fuchsia
/
third_party
/
rust
/
a7a6dedfe661a6d9d181afeb0fbaa894fcb7362b
/
.
/
src
/
test
/
ui
/
coercion
/
coercion-slice.rs
blob: b69edcf26063738cc7d22383b64ff3649c82fa4d [
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 element
}