2025-04-22 20:07:15 +00:00
|
|
|
error[E0308]: mismatched types
|
2025-04-05 16:19:56 +00:00
|
|
|
--> $DIR/byte-string-mutability-mismatch.rs:10:9
|
2025-04-22 20:07:15 +00:00
|
|
|
|
|
|
|
|
LL | match &mut val {
|
|
|
|
| -------- this expression has type `&mut [u8; 2]`
|
|
|
|
LL | b"a\n" => {},
|
|
|
|
| ^^^^^^ types differ in mutability
|
|
|
|
|
|
|
|
|
= note: expected mutable reference `&mut _`
|
|
|
|
found reference `&'static _`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2025-04-05 16:19:56 +00:00
|
|
|
--> $DIR/byte-string-mutability-mismatch.rs:16:10
|
2025-04-22 20:07:15 +00:00
|
|
|
|
|
|
|
|
LL | match &mut val[..] {
|
|
|
|
| ------------ this expression has type `&mut [u8]`
|
|
|
|
LL | b"a\n" => {},
|
|
|
|
| ^^^^^^ types differ in mutability
|
|
|
|
|
|
|
|
|
= note: expected mutable reference `&mut _`
|
|
|
|
found reference `&'static _`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|