]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-57741.stderr
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-57741.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-57741.rs:20:9
3    |
4 LL |     let y = match x {
5    |                   -
6    |                   |
7    |                   this expression has type `Box<T>`
8    |                   help: consider dereferencing the boxed value: `*x`
9 LL |         T::A(a) | T::B(a) => a,
10    |         ^^^^^^^ expected struct `Box`, found enum `T`
11    |
12    = note: expected struct `Box<T>`
13                 found enum `T`
14
15 error[E0308]: mismatched types
16   --> $DIR/issue-57741.rs:20:19
17    |
18 LL |     let y = match x {
19    |                   -
20    |                   |
21    |                   this expression has type `Box<T>`
22    |                   help: consider dereferencing the boxed value: `*x`
23 LL |         T::A(a) | T::B(a) => a,
24    |                   ^^^^^^^ expected struct `Box`, found enum `T`
25    |
26    = note: expected struct `Box<T>`
27                 found enum `T`
28
29 error[E0308]: mismatched types
30   --> $DIR/issue-57741.rs:27:9
31    |
32 LL |     let y = match x {
33    |                   -
34    |                   |
35    |                   this expression has type `Box<S>`
36    |                   help: consider dereferencing the boxed value: `*x`
37 LL |         S::A { a } | S::B { b: a } => a,
38    |         ^^^^^^^^^^ expected struct `Box`, found enum `S`
39    |
40    = note: expected struct `Box<S>`
41                 found enum `S`
42
43 error[E0308]: mismatched types
44   --> $DIR/issue-57741.rs:27:22
45    |
46 LL |     let y = match x {
47    |                   -
48    |                   |
49    |                   this expression has type `Box<S>`
50    |                   help: consider dereferencing the boxed value: `*x`
51 LL |         S::A { a } | S::B { b: a } => a,
52    |                      ^^^^^^^^^^^^^ expected struct `Box`, found enum `S`
53    |
54    = note: expected struct `Box<S>`
55                 found enum `S`
56
57 error: aborting due to 4 previous errors
58
59 For more information about this error, try `rustc --explain E0308`.