2024-04-05 22:27:29 -05:00
|
|
|
error[E0308]: mismatched types
|
2024-04-14 12:33:11 -05:00
|
|
|
--> $DIR/mut_preserve_binding_mode_2021.rs:10:9
|
2024-04-05 22:27:29 -05:00
|
|
|
|
|
|
|
|
LL | let Foo(mut a) = &Foo(0);
|
|
|
|
| ----- expected due to the type of this binding
|
|
|
|
LL | a = &42;
|
|
|
|
| ^^^ expected `u8`, found `&{integer}`
|
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL - a = &42;
|
|
|
|
LL + a = 42;
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-04-14 12:33:11 -05:00
|
|
|
--> $DIR/mut_preserve_binding_mode_2021.rs:14:9
|
2024-04-05 22:27:29 -05:00
|
|
|
|
|
|
|
|
LL | let Foo(mut a) = &mut Foo(0);
|
|
|
|
| ----- expected due to the type of this binding
|
|
|
|
LL | a = &mut 42;
|
|
|
|
| ^^^^^^^ expected `u8`, found `&mut {integer}`
|
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL - a = &mut 42;
|
|
|
|
LL + a = 42;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|