summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-call-on-pat-mismatch.stderr
blob: 7338312bab651eb8ca999ff76830aa00e7c5889d (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
26
27
28
29
30
31
32
33
error[E0308]: mismatched types
  --> $DIR/suggest-call-on-pat-mismatch.rs:7:12
   |
LL |     if let E::One(var1, var2) = var {
   |            ^^^^^^^^^^^^^^^^^^   --- this expression has type `fn(i32, i32) -> E {E::One}`
   |            |
   |            expected enum constructor, found `E`
   |
   = note: expected enum constructor `fn(i32, i32) -> E {E::One}`
                          found enum `E`
help: use parentheses to construct this tuple variant
   |
LL |     if let E::One(var1, var2) = var(/* i32 */, /* i32 */) {
   |                                    ++++++++++++++++++++++

error[E0308]: mismatched types
  --> $DIR/suggest-call-on-pat-mismatch.rs:13:9
   |
LL |     let Some(x) = Some;
   |         ^^^^^^^   ---- this expression has type `fn(_) -> Option<_> {Option::<_>::Some}`
   |         |
   |         expected enum constructor, found `Option<_>`
   |
   = note: expected enum constructor `fn(_) -> Option<_> {Option::<_>::Some}`
                          found enum `Option<_>`
help: use parentheses to construct this tuple variant
   |
LL |     let Some(x) = Some(/* value */);
   |                       +++++++++++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.