fork/rust

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

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

master
1.6 KiB67 linesraw
1error[E0308]: mismatched types
2  --> $DIR/field-access.rs:20:12
3   |
4LL |     Fst,
5   |     --- unit variant defined here
6...
7LL |     if let B::Fst = a {};
8   |            ^^^^^^   - this expression has type `A`
9   |            |
10   |            expected `A`, found `B`
11   |
12help: you might have meant to use field `b` whose type is `B`
13   |
14LL |     if let B::Fst = a.b {};
15   |                     ~~~
16
17error[E0308]: mismatched types
18  --> $DIR/field-access.rs:25:9
19   |
20LL |     Fst,
21   |     --- unit variant defined here
22...
23LL |     match a {
24   |           - this expression has type `A`
25...
26LL |         B::Fst => (),
27   |         ^^^^^^ expected `A`, found `B`
28   |
29help: you might have meant to use field `b` whose type is `B`
30   |
31LL |     match a.b {
32   |           ~~~
33
34error[E0308]: mismatched types
35  --> $DIR/field-access.rs:26:9
36   |
37LL |     Snd,
38   |     --- unit variant defined here
39...
40LL |     match a {
41   |           - this expression has type `A`
42...
43LL |         B::Snd => (),
44   |         ^^^^^^ expected `A`, found `B`
45   |
46help: you might have meant to use field `b` whose type is `B`
47   |
48LL |     match a.b {
49   |           ~~~
50
51error[E0308]: mismatched types
52  --> $DIR/field-access.rs:32:9
53   |
54LL |     match foo {
55   |           --- this expression has type `Foo`
56LL |
57LL |         1u32 => (),
58   |         ^^^^ expected `Foo`, found `u32`
59   |
60help: you might have meant to use field `bar` whose type is `u32`
61   |
62LL |     match unsafe { foo.bar } {
63   |           ~~~~~~~~~~~~~~~~~~
64
65error: aborting due to 4 previous errors
66
67For more information about this error, try `rustc --explain E0308`.