]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-ascription-soundness.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / type / type-ascription-soundness.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-ascription-soundness.rs:17:17
3    |
4 LL |     let ref x = arr: &[u8]; //~ ERROR mismatched types
5    |                 ^^^ expected slice, found array of 3 elements
6    |
7    = note: expected type `&[u8]`
8               found type `&[u8; 3]`
9
10 error[E0308]: mismatched types
11   --> $DIR/type-ascription-soundness.rs:18:21
12    |
13 LL |     let ref mut x = arr: &[u8]; //~ ERROR mismatched types
14    |                     ^^^ expected slice, found array of 3 elements
15    |
16    = note: expected type `&[u8]`
17               found type `&[u8; 3]`
18
19 error[E0308]: mismatched types
20   --> $DIR/type-ascription-soundness.rs:19:11
21    |
22 LL |     match arr: &[u8] { //~ ERROR mismatched types
23    |           ^^^ expected slice, found array of 3 elements
24    |
25    = note: expected type `&[u8]`
26               found type `&[u8; 3]`
27
28 error[E0308]: mismatched types
29   --> $DIR/type-ascription-soundness.rs:22:17
30    |
31 LL |     let _len = (arr: &[u8]).len(); //~ ERROR mismatched types
32    |                 ^^^ expected slice, found array of 3 elements
33    |
34    = note: expected type `&[u8]`
35               found type `&[u8; 3]`
36
37 error: aborting due to 4 previous errors
38
39 For more information about this error, try `rustc --explain E0308`.