rust/tests/ui/consts/const-slice-array-deref.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
232 B
Rust
Raw Normal View History

const ONE: [u16] = [1];
//~^ ERROR the size for values of type `[u16]` cannot be known at compilation time
//~| ERROR mismatched types
const TWO: &'static u16 = &ONE[0];
//~^ ERROR cannot move a value of type `[u16]`
fn main() {}