about summary refs log tree commit diff
path: root/tests/ui/pattern/byte-string-mutability-mismatch.stderr
blob: f64b452b594e9437dd974e24b43f620b3ccdd119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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`.