fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
985 B25 linesraw
1error[E0308]: mismatched types
2  --> $DIR/let-else-binding-explicit-mut-annotated.rs:9:37
3   |
4LL |     let Some(n): &mut Option<i32> = &&Some(5i32) else { return };
5   |                  ----------------   ^^^^^^^^^^^^ types differ in mutability
6   |                  |
7   |                  expected due to this
8   |
9   = note: expected mutable reference `&mut Option<i32>`
10                      found reference `&&Option<i32>`
11
12error[E0308]: mismatched types
13  --> $DIR/let-else-binding-explicit-mut-annotated.rs:13:37
14   |
15LL |     let Some(n): &mut Option<i32> = &&mut Some(5i32) else { return };
16   |                  ----------------   ^^^^^^^^^^^^^^^^ types differ in mutability
17   |                  |
18   |                  expected due to this
19   |
20   = note: expected mutable reference `&mut Option<i32>`
21                      found reference `&&mut Option<i32>`
22
23error: aborting due to 2 previous errors
24
25For more information about this error, try `rustc --explain E0308`.