fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB33 linesraw
1error[E0308]: mismatched types
2  --> $DIR/suggest-call-on-pat-mismatch.rs:7:12
3   |
4LL |     if let E::One(var1, var2) = var {
5   |            ^^^^^^^^^^^^^^^^^^   --- this expression has type `fn(i32, i32) -> E {E::One}`
6   |            |
7   |            expected enum constructor, found `E`
8   |
9   = note: expected enum constructor `fn(i32, i32) -> E {E::One}`
10                          found enum `E`
11help: use parentheses to construct this tuple variant
12   |
13LL |     if let E::One(var1, var2) = var(/* i32 */, /* i32 */) {
14   |                                    ++++++++++++++++++++++
15
16error[E0308]: mismatched types
17  --> $DIR/suggest-call-on-pat-mismatch.rs:13:9
18   |
19LL |     let Some(x) = Some;
20   |         ^^^^^^^   ---- this expression has type `fn(_) -> Option<_> {Option::<_>::Some}`
21   |         |
22   |         expected enum constructor, found `Option<_>`
23   |
24   = note: expected enum constructor `fn(_) -> Option<_> {Option::<_>::Some}`
25                          found enum `Option<_>`
26help: use parentheses to construct this tuple variant
27   |
28LL |     let Some(x) = Some(/* value */);
29   |                       +++++++++++++
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0308`.