rust/tests/ui/pattern/byte-string-mutability-mismatch.stderr

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`.