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