2021-10-17 00:42:22 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-binding-explicit-mut-annotated.rs:9:37
|
|
|
|
|
|
|
|
|
LL | let Some(n): &mut Option<i32> = &&Some(5i32) else { return };
|
2022-06-02 09:39:47 -05:00
|
|
|
| ---------------- ^^^^^^^^^^^^ types differ in mutability
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2021-10-17 00:42:22 -05:00
|
|
|
|
|
2023-12-07 21:54:41 -06:00
|
|
|
= note: expected mutable reference `&mut Option<_>`
|
|
|
|
found reference `&&Option<_>`
|
2021-10-17 00:42:22 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/let-else-binding-explicit-mut-annotated.rs:13:37
|
|
|
|
|
|
|
|
|
LL | let Some(n): &mut Option<i32> = &&mut Some(5i32) else { return };
|
2022-06-02 09:39:47 -05:00
|
|
|
| ---------------- ^^^^^^^^^^^^^^^^ types differ in mutability
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2021-10-17 00:42:22 -05:00
|
|
|
|
|
2023-12-07 21:54:41 -06:00
|
|
|
= note: expected mutable reference `&mut Option<_>`
|
|
|
|
found reference `&&mut Option<_>`
|
2021-10-17 00:42:22 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|