]> git.lizzy.rs Git - rust.git/blob - tests/ui/let-else/let-else-ref-bindings.stderr
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / let-else / let-else-ref-bindings.stderr
1 error[E0308]: mismatched types
2   --> $DIR/let-else-ref-bindings.rs:16:38
3    |
4 LL |     let Some(ref a): Option<&[u8]> = some else { return };
5    |                                      ^^^^ expected `&[u8]`, found struct `Vec`
6    |
7    = note: expected enum `Option<&[u8]>`
8               found enum `Option<Vec<u8>>`
9
10 error[E0308]: mismatched types
11   --> $DIR/let-else-ref-bindings.rs:20:38
12    |
13 LL |     let Some(ref a): Option<&[u8]> = &some else { return };
14    |                                      ^^^^^ expected enum `Option`, found `&Option<Vec<u8>>`
15    |
16    = note:   expected enum `Option<&[u8]>`
17            found reference `&Option<Vec<u8>>`
18
19 error[E0308]: mismatched types
20   --> $DIR/let-else-ref-bindings.rs:24:34
21    |
22 LL |     let Some(a): Option<&[u8]> = some else { return };
23    |                  -------------   ^^^^ expected `&[u8]`, found struct `Vec`
24    |                  |
25    |                  expected due to this
26    |
27    = note: expected enum `Option<&[u8]>`
28               found enum `Option<Vec<u8>>`
29
30 error[E0308]: mismatched types
31   --> $DIR/let-else-ref-bindings.rs:27:34
32    |
33 LL |     let Some(a): Option<&[u8]> = &some else { return };
34    |                  -------------   ^^^^^ expected enum `Option`, found `&Option<Vec<u8>>`
35    |                  |
36    |                  expected due to this
37    |
38    = note:   expected enum `Option<&[u8]>`
39            found reference `&Option<Vec<u8>>`
40
41 error[E0308]: mismatched types
42   --> $DIR/let-else-ref-bindings.rs:44:46
43    |
44 LL |     let Some(ref mut a): Option<&mut [u8]> = some else { return };
45    |                                              ^^^^ expected `&mut [u8]`, found struct `Vec`
46    |
47    = note: expected enum `Option<&mut [u8]>`
48               found enum `Option<Vec<u8>>`
49
50 error[E0308]: mismatched types
51   --> $DIR/let-else-ref-bindings.rs:48:46
52    |
53 LL |     let Some(ref mut a): Option<&mut [u8]> = &mut some else { return };
54    |                                              ^^^^^^^^^ expected enum `Option`, found mutable reference
55    |
56    = note:           expected enum `Option<&mut [u8]>`
57            found mutable reference `&mut Option<Vec<u8>>`
58
59 error[E0308]: mismatched types
60   --> $DIR/let-else-ref-bindings.rs:52:38
61    |
62 LL |     let Some(a): Option<&mut [u8]> = some else { return };
63    |                  -----------------   ^^^^ expected `&mut [u8]`, found struct `Vec`
64    |                  |
65    |                  expected due to this
66    |
67    = note: expected enum `Option<&mut [u8]>`
68               found enum `Option<Vec<u8>>`
69
70 error[E0308]: mismatched types
71   --> $DIR/let-else-ref-bindings.rs:55:38
72    |
73 LL |     let Some(a): Option<&mut [u8]> = &mut some else { return };
74    |                  -----------------   ^^^^^^^^^ expected enum `Option`, found mutable reference
75    |                  |
76    |                  expected due to this
77    |
78    = note:           expected enum `Option<&mut [u8]>`
79            found mutable reference `&mut Option<Vec<u8>>`
80
81 error: aborting due to 8 previous errors
82
83 For more information about this error, try `rustc --explain E0308`.