1 error[E0308]: mismatched types
2 --> $DIR/let-else-ref-bindings.rs:16:38
4 LL | let Some(ref a): Option<&[u8]> = some else { return };
5 | ^^^^ expected `&[u8]`, found struct `Vec`
7 = note: expected enum `Option<&[u8]>`
8 found enum `Option<Vec<u8>>`
10 error[E0308]: mismatched types
11 --> $DIR/let-else-ref-bindings.rs:20:38
13 LL | let Some(ref a): Option<&[u8]> = &some else { return };
14 | ^^^^^ expected enum `Option`, found `&Option<Vec<u8>>`
16 = note: expected enum `Option<&[u8]>`
17 found reference `&Option<Vec<u8>>`
19 error[E0308]: mismatched types
20 --> $DIR/let-else-ref-bindings.rs:24:34
22 LL | let Some(a): Option<&[u8]> = some else { return };
23 | ------------- ^^^^ expected `&[u8]`, found struct `Vec`
25 | expected due to this
27 = note: expected enum `Option<&[u8]>`
28 found enum `Option<Vec<u8>>`
30 error[E0308]: mismatched types
31 --> $DIR/let-else-ref-bindings.rs:27:34
33 LL | let Some(a): Option<&[u8]> = &some else { return };
34 | ------------- ^^^^^ expected enum `Option`, found `&Option<Vec<u8>>`
36 | expected due to this
38 = note: expected enum `Option<&[u8]>`
39 found reference `&Option<Vec<u8>>`
41 error[E0308]: mismatched types
42 --> $DIR/let-else-ref-bindings.rs:44:46
44 LL | let Some(ref mut a): Option<&mut [u8]> = some else { return };
45 | ^^^^ expected `&mut [u8]`, found struct `Vec`
47 = note: expected enum `Option<&mut [u8]>`
48 found enum `Option<Vec<u8>>`
50 error[E0308]: mismatched types
51 --> $DIR/let-else-ref-bindings.rs:48:46
53 LL | let Some(ref mut a): Option<&mut [u8]> = &mut some else { return };
54 | ^^^^^^^^^ expected enum `Option`, found mutable reference
56 = note: expected enum `Option<&mut [u8]>`
57 found mutable reference `&mut Option<Vec<u8>>`
59 error[E0308]: mismatched types
60 --> $DIR/let-else-ref-bindings.rs:52:38
62 LL | let Some(a): Option<&mut [u8]> = some else { return };
63 | ----------------- ^^^^ expected `&mut [u8]`, found struct `Vec`
65 | expected due to this
67 = note: expected enum `Option<&mut [u8]>`
68 found enum `Option<Vec<u8>>`
70 error[E0308]: mismatched types
71 --> $DIR/let-else-ref-bindings.rs:55:38
73 LL | let Some(a): Option<&mut [u8]> = &mut some else { return };
74 | ----------------- ^^^^^^^^^ expected enum `Option`, found mutable reference
76 | expected due to this
78 = note: expected enum `Option<&mut [u8]>`
79 found mutable reference `&mut Option<Vec<u8>>`
81 error: aborting due to 8 previous errors
83 For more information about this error, try `rustc --explain E0308`.