2021-10-17 02:29:00 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:16:38
|
|
|
|
|
|
|
|
|
LL | let Some(ref a): Option<&[u8]> = some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^ expected `Option<&[u8]>`, found `Option<Vec<u8>>`
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&[u8]>`
|
|
|
|
found enum `Option<Vec<u8>>`
|
2023-05-30 13:47:50 -05:00
|
|
|
help: try using `.as_deref()` to convert `Option<Vec<u8>>` to `Option<&[u8]>`
|
|
|
|
|
|
|
|
|
LL | let Some(ref a): Option<&[u8]> = some.as_deref() else { return };
|
|
|
|
| +++++++++++
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:20:38
|
|
|
|
|
|
|
|
|
LL | let Some(ref a): Option<&[u8]> = &some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^ expected `Option<&[u8]>`, found `&Option<Vec<u8>>`
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&[u8]>`
|
|
|
|
found reference `&Option<Vec<u8>>`
|
2023-05-30 13:47:50 -05:00
|
|
|
help: try using `.as_deref()` to convert `&Option<Vec<u8>>` to `Option<&[u8]>`
|
|
|
|
|
|
2023-05-30 17:11:39 -05:00
|
|
|
LL - let Some(ref a): Option<&[u8]> = &some else { return };
|
|
|
|
LL + let Some(ref a): Option<&[u8]> = some.as_deref() else { return };
|
|
|
|
|
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:24:34
|
|
|
|
|
|
|
|
|
LL | let Some(a): Option<&[u8]> = some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ------------- ^^^^ expected `Option<&[u8]>`, found `Option<Vec<u8>>`
|
2022-06-02 09:39:47 -05:00
|
|
|
| |
|
|
|
|
| expected due to this
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&[u8]>`
|
|
|
|
found enum `Option<Vec<u8>>`
|
2023-05-30 13:47:50 -05:00
|
|
|
help: try using `.as_deref()` to convert `Option<Vec<u8>>` to `Option<&[u8]>`
|
|
|
|
|
|
|
|
|
LL | let Some(a): Option<&[u8]> = some.as_deref() else { return };
|
|
|
|
| +++++++++++
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:27:34
|
|
|
|
|
|
|
|
|
LL | let Some(a): Option<&[u8]> = &some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ------------- ^^^^^ expected `Option<&[u8]>`, found `&Option<Vec<u8>>`
|
2022-06-02 09:39:47 -05:00
|
|
|
| |
|
|
|
|
| expected due to this
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&[u8]>`
|
|
|
|
found reference `&Option<Vec<u8>>`
|
2023-05-30 13:47:50 -05:00
|
|
|
help: try using `.as_deref()` to convert `&Option<Vec<u8>>` to `Option<&[u8]>`
|
|
|
|
|
|
2023-05-30 17:11:39 -05:00
|
|
|
LL - let Some(a): Option<&[u8]> = &some else { return };
|
|
|
|
LL + let Some(a): Option<&[u8]> = some.as_deref() else { return };
|
|
|
|
|
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:44:46
|
|
|
|
|
|
|
|
|
LL | let Some(ref mut a): Option<&mut [u8]> = some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^ expected `Option<&mut [u8]>`, found `Option<Vec<u8>>`
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&mut [u8]>`
|
|
|
|
found enum `Option<Vec<u8>>`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:48:46
|
|
|
|
|
|
|
|
|
LL | let Some(ref mut a): Option<&mut [u8]> = &mut some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^ expected `Option<&mut [u8]>`, found `&mut Option<Vec<u8>>`
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&mut [u8]>`
|
|
|
|
found mutable reference `&mut Option<Vec<u8>>`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:52:38
|
|
|
|
|
|
|
|
|
LL | let Some(a): Option<&mut [u8]> = some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ----------------- ^^^^ expected `Option<&mut [u8]>`, found `Option<Vec<u8>>`
|
2022-06-02 09:39:47 -05:00
|
|
|
| |
|
|
|
|
| expected due to this
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&mut [u8]>`
|
|
|
|
found enum `Option<Vec<u8>>`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-ref-bindings.rs:55:38
|
|
|
|
|
|
|
|
|
LL | let Some(a): Option<&mut [u8]> = &mut some else { return };
|
2023-01-02 20:00:33 -06:00
|
|
|
| ----------------- ^^^^^^^^^ expected `Option<&mut [u8]>`, found `&mut Option<Vec<u8>>`
|
2022-06-02 09:39:47 -05:00
|
|
|
| |
|
|
|
|
| expected due to this
|
2021-10-17 02:29:00 -05:00
|
|
|
|
|
|
|
|
= note: expected enum `Option<&mut [u8]>`
|
|
|
|
found mutable reference `&mut Option<Vec<u8>>`
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|