rust/src/test/ui/let-else/let-else-binding-explicit-mut-annotated.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
851 B
Plaintext
Raw Normal View History

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 };
| ^^^^^^^^^^^^ types differ in mutability
|
= note: expected mutable reference `&mut Option<i32>`
found reference `&&Option<i32>`
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 };
| ^^^^^^^^^^^^^^^^ types differ in mutability
|
= note: expected mutable reference `&mut Option<i32>`
found reference `&&mut Option<i32>`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.