1error[E0308]: mismatched types 2 --> $DIR/let-else-ref-bindings.rs:16:38 3 | 4LL | let Some(ref a): Option<&[u8]> = some else { return }; 5 | ^^^^ expected `Option<&[u8]>`, found `Option<Vec<u8>>` 6 | 7 = note: expected enum `Option<&[u8]>` 8 found enum `Option<Vec<u8>>` 9help: try using `.as_deref()` to convert `Option<Vec<u8>>` to `Option<&[u8]>` 10 | 11LL | let Some(ref a): Option<&[u8]> = some.as_deref() else { return }; 12 | +++++++++++ 13 14error[E0308]: mismatched types 15 --> $DIR/let-else-ref-bindings.rs:20:38 16 | 17LL | let Some(ref a): Option<&[u8]> = &some else { return }; 18 | ^^^^^ expected `Option<&[u8]>`, found `&Option<Vec<u8>>` 19 | 20 = note: expected enum `Option<&[u8]>` 21 found reference `&Option<Vec<u8>>` 22help: try using `.as_deref()` to convert `&Option<Vec<u8>>` to `Option<&[u8]>` 23 | 24LL - let Some(ref a): Option<&[u8]> = &some else { return }; 25LL + let Some(ref a): Option<&[u8]> = some.as_deref() else { return }; 26 | 27 28error[E0308]: mismatched types 29 --> $DIR/let-else-ref-bindings.rs:24:34 30 | 31LL | let Some(a): Option<&[u8]> = some else { return }; 32 | ------------- ^^^^ expected `Option<&[u8]>`, found `Option<Vec<u8>>` 33 | | 34 | expected due to this 35 | 36 = note: expected enum `Option<&[u8]>` 37 found enum `Option<Vec<u8>>` 38help: try using `.as_deref()` to convert `Option<Vec<u8>>` to `Option<&[u8]>` 39 | 40LL | let Some(a): Option<&[u8]> = some.as_deref() else { return }; 41 | +++++++++++ 42 43error[E0308]: mismatched types 44 --> $DIR/let-else-ref-bindings.rs:27:34 45 | 46LL | let Some(a): Option<&[u8]> = &some else { return }; 47 | ------------- ^^^^^ expected `Option<&[u8]>`, found `&Option<Vec<u8>>` 48 | | 49 | expected due to this 50 | 51 = note: expected enum `Option<&[u8]>` 52 found reference `&Option<Vec<u8>>` 53help: try using `.as_deref()` to convert `&Option<Vec<u8>>` to `Option<&[u8]>` 54 | 55LL - let Some(a): Option<&[u8]> = &some else { return }; 56LL + let Some(a): Option<&[u8]> = some.as_deref() else { return }; 57 | 58 59error[E0308]: mismatched types 60 --> $DIR/let-else-ref-bindings.rs:44:46 61 | 62LL | let Some(ref mut a): Option<&mut [u8]> = some else { return }; 63 | ^^^^ expected `Option<&mut [u8]>`, found `Option<Vec<u8>>` 64 | 65 = note: expected enum `Option<&mut [u8]>` 66 found enum `Option<Vec<u8>>` 67 68error[E0308]: mismatched types 69 --> $DIR/let-else-ref-bindings.rs:48:46 70 | 71LL | let Some(ref mut a): Option<&mut [u8]> = &mut some else { return }; 72 | ^^^^^^^^^ expected `Option<&mut [u8]>`, found `&mut Option<Vec<u8>>` 73 | 74 = note: expected enum `Option<&mut [u8]>` 75 found mutable reference `&mut Option<Vec<u8>>` 76 77error[E0308]: mismatched types 78 --> $DIR/let-else-ref-bindings.rs:52:38 79 | 80LL | let Some(a): Option<&mut [u8]> = some else { return }; 81 | ----------------- ^^^^ expected `Option<&mut [u8]>`, found `Option<Vec<u8>>` 82 | | 83 | expected due to this 84 | 85 = note: expected enum `Option<&mut [u8]>` 86 found enum `Option<Vec<u8>>` 87 88error[E0308]: mismatched types 89 --> $DIR/let-else-ref-bindings.rs:55:38 90 | 91LL | let Some(a): Option<&mut [u8]> = &mut some else { return }; 92 | ----------------- ^^^^^^^^^ expected `Option<&mut [u8]>`, found `&mut Option<Vec<u8>>` 93 | | 94 | expected due to this 95 | 96 = note: expected enum `Option<&mut [u8]>` 97 found mutable reference `&mut Option<Vec<u8>>` 98 99error: aborting due to 8 previous errors 100 101For more information about this error, try `rustc --explain E0308`. 102