Sign in
android
/
toolchain
/
rustc
/
ff3f07ae99a30006dd85b9d73084edd9355c9db6
/
.
/
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
}