about summary refs log tree commit diff
path: root/tests/ui/consts/const-slice-array-deref.stderr
blob: 6e69744144ed9244cbdbcc10f594d97f8e7919a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
error[E0277]: the size for values of type `[u16]` cannot be known at compilation time
  --> $DIR/const-slice-array-deref.rs:1:12
   |
LL | const ONE: [u16] = [1];
   |            ^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u16]`

error[E0308]: mismatched types
  --> $DIR/const-slice-array-deref.rs:1:20
   |
LL | const ONE: [u16] = [1];
   |                    ^^^ expected `[u16]`, found `[u16; 1]`

error[E0277]: the size for values of type `[u16]` cannot be known at compilation time
  --> $DIR/const-slice-array-deref.rs:1:20
   |
LL | const ONE: [u16] = [1];
   |                    ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u16]`
   = note: constant expressions must have a statically known size

error[E0161]: cannot move a value of type `[u16]`
  --> $DIR/const-slice-array-deref.rs:6:28
   |
LL | const TWO: &'static u16 = &ONE[0];
   |                            ^^^ the size of `[u16]` cannot be statically determined

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0161, E0277, E0308.
For more information about an error, try `rustc --explain E0161`.