mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-07 13:25:45 +00:00
32 lines
835 B
Plaintext
32 lines
835 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/feature-gate-mut_preserve_binding_mode_2024.rs:8:9
|
|
|
|
|
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
|
|
--> $DIR/feature-gate-mut_preserve_binding_mode_2024.rs:12:9
|
|
|
|
|
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`.
|