rust/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.stderr
2024-04-15 23:27:21 -04:00

32 lines
953 B
Plaintext

error: dereferencing `mut` binding
--> $DIR/mut_preserve_binding_mode_2024_lint.rs:9:13
|
LL | let Foo(mut a) = &Foo(0);
| ^^^^^ `mut` dereferences the type of this binding
|
help: this will change in edition 2024
--> $DIR/mut_preserve_binding_mode_2024_lint.rs:9:13
|
LL | let Foo(mut a) = &Foo(0);
| ^^^^^
note: the lint level is defined here
--> $DIR/mut_preserve_binding_mode_2024_lint.rs:4:11
|
LL | #![forbid(dereferencing_mut_binding)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: dereferencing `mut` binding
--> $DIR/mut_preserve_binding_mode_2024_lint.rs:13:13
|
LL | let Foo(mut a) = &mut Foo(0);
| ^^^^^ `mut` dereferences the type of this binding
|
help: this will change in edition 2024
--> $DIR/mut_preserve_binding_mode_2024_lint.rs:13:13
|
LL | let Foo(mut a) = &mut Foo(0);
| ^^^^^
error: aborting due to 2 previous errors