Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
coercion
/
coercion-slice.rs
blob: a0795e8316f2986b0d67c0d0a900376e9297e8b7 [
file
] [
log
] [
blame
]
// Tests that we forbid coercion from `[T; n]` to `&[T]`
fn
main
()
{
let
_
:
&[
i32
]
=
[
0
];
//~^ ERROR mismatched types
//~| NOTE expected `&[i32]`, found `[{integer}; 1]`
//~| NOTE expected due to this
}