mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-10 08:57:36 +00:00
26 lines
828 B
Plaintext
26 lines
828 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/byte-string-mutability-mismatch.rs:10:9
|
|
|
|
|
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
|
|
--> $DIR/byte-string-mutability-mismatch.rs:16:10
|
|
|
|
|
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`.
|