1 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2 --> $DIR/suggest-borrow.rs:2:9
4 LL | let x: [u8] = vec!(1, 2, 3)[..];
5 | ^ doesn't have a size known at compile-time
7 = help: the trait `Sized` is not implemented for `[u8]`
8 = note: all local variables must have a statically known size
9 = help: unsized locals are gated as an unstable feature
10 help: consider borrowing here
12 LL | let x: &[u8] = vec!(1, 2, 3)[..];
15 error[E0308]: mismatched types
16 --> $DIR/suggest-borrow.rs:3:20
18 LL | let x: &[u8] = vec!(1, 2, 3)[..];
19 | ----- ^^^^^^^^^^^^^^^^^
21 | | expected `&[u8]`, found slice `[{integer}]`
22 | | help: consider borrowing here: `&vec!(1, 2, 3)[..]`
23 | expected due to this
25 error[E0308]: mismatched types
26 --> $DIR/suggest-borrow.rs:4:19
28 LL | let x: [u8] = &vec!(1, 2, 3)[..];
29 | ---- ^^^^^^^^^^^^^^^^^^ expected slice `[u8]`, found `&[{integer}]`
31 | expected due to this
33 help: consider removing the borrow
35 LL - let x: [u8] = &vec!(1, 2, 3)[..];
36 LL + let x: [u8] = vec!(1, 2, 3)[..];
38 help: alternatively, consider changing the type annotation
40 LL | let x: &[u8] = &vec!(1, 2, 3)[..];
43 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
44 --> $DIR/suggest-borrow.rs:4:9
46 LL | let x: [u8] = &vec!(1, 2, 3)[..];
47 | ^ doesn't have a size known at compile-time
49 = help: the trait `Sized` is not implemented for `[u8]`
50 = note: all local variables must have a statically known size
51 = help: unsized locals are gated as an unstable feature
52 help: consider borrowing here
54 LL | let x: &[u8] = &vec!(1, 2, 3)[..];
57 error: aborting due to 4 previous errors
59 Some errors have detailed explanations: E0277, E0308.
60 For more information about an error, try `rustc --explain E0277`.