|
1 | | -error: alias `b` conflicts with deserialization name of other field |
2 | | - --> tests/ui/conflict/alias-enum.rs:8:9 |
| 1 | +error: expected expression, found `@` |
| 2 | + --> tests/ui/conflict/alias-enum.rs:80:5 |
3 | 3 | | |
4 | | -8 | / /// Expected error on "alias b", because this is a name of other field |
5 | | -9 | | /// Error on "alias a" is not expected because this is a name of this field |
6 | | -10 | | /// Error on "alias c" is not expected because field `c` is skipped |
7 | | -11 | | #[serde(alias = "a", alias = "b", alias = "c")] |
8 | | -12 | | a: (), |
9 | | - | |_____________^ |
| 4 | +80 | @//fail |
| 5 | + | ^ expected expression |
10 | 6 |
|
11 | | -error: alias `c` already used by field a |
12 | | - --> tests/ui/conflict/alias-enum.rs:14:9 |
| 7 | +warning: unreachable pattern |
| 8 | + --> tests/ui/conflict/alias-enum.rs:16:9 |
13 | 9 | | |
14 | | -14 | / /// Expected error on "alias c", because it is already used as alias of `a` |
15 | | -15 | | #[serde(alias = "c")] |
16 | | -16 | | b: (), |
17 | | - | |_____________^ |
| 10 | +11 | #[serde(alias = "a", alias = "b", alias = "c")] |
| 11 | + | --- matches all the relevant values |
| 12 | +... |
| 13 | +16 | b: (), |
| 14 | + | ^ no value can reach this |
| 15 | + | |
| 16 | + = note: `#[warn(unreachable_patterns)]` on by default |
| 17 | + |
| 18 | +warning: unreachable pattern |
| 19 | + --> tests/ui/conflict/alias-enum.rs:15:25 |
| 20 | + | |
| 21 | +11 | #[serde(alias = "a", alias = "b", alias = "c")] |
| 22 | + | --- matches all the relevant values |
| 23 | +... |
| 24 | +15 | #[serde(alias = "c")] |
| 25 | + | ^^^ no value can reach this |
18 | 26 |
|
19 | | -error: alias `c` conflicts with deserialization name of other field |
20 | | - --> tests/ui/conflict/alias-enum.rs:23:9 |
| 27 | +warning: unreachable pattern |
| 28 | + --> tests/ui/conflict/alias-enum.rs:28:26 |
21 | 29 | | |
22 | | -23 | / /// Expected error on "alias c", because this is a name of other field after |
23 | | -24 | | /// applying rename rules |
24 | | -25 | | #[serde(alias = "b", alias = "c")] |
25 | | -26 | | a: (), |
26 | | - | |_____________^ |
| 30 | +25 | #[serde(alias = "b", alias = "c")] |
| 31 | + | --- matches all the relevant values |
| 32 | +... |
| 33 | +28 | #[serde(rename = "c")] |
| 34 | + | ^^^ no value can reach this |
27 | 35 |
|
28 | | -error: alias `B` conflicts with deserialization name of other field |
29 | | - --> tests/ui/conflict/alias-enum.rs:34:9 |
| 36 | +warning: unreachable pattern |
| 37 | + --> tests/ui/conflict/alias-enum.rs:38:9 |
30 | 38 | | |
31 | | -34 | / /// Expected error on "alias B", because this is a name of field after |
32 | | -35 | | /// applying rename rules |
33 | | -36 | | #[serde(alias = "B", alias = "c")] |
34 | | -37 | | a: (), |
35 | | - | |_____________^ |
| 39 | +36 | #[serde(alias = "B", alias = "c")] |
| 40 | + | --- matches all the relevant values |
| 41 | +37 | a: (), |
| 42 | +38 | b: (), |
| 43 | + | ^ no value can reach this |
36 | 44 |
|
37 | | -error: alias `b` conflicts with deserialization name of other variant |
38 | | - --> tests/ui/conflict/alias-enum.rs:44:5 |
| 45 | +warning: unreachable pattern |
| 46 | + --> tests/ui/conflict/alias-enum.rs:52:5 |
39 | 47 | | |
40 | | -44 | / /// Expected error on "alias b", because this is a name of other variant |
41 | | -45 | | /// Error on "alias a" is not expected because this is a name of this variant |
42 | | -46 | | /// Error on "alias c" is not expected because variant `c` is skipped |
43 | | -47 | | #[serde(alias = "a", alias = "b", alias = "c")] |
44 | | -48 | | a, |
45 | | - | |_____^ |
| 48 | +47 | #[serde(alias = "a", alias = "b", alias = "c")] |
| 49 | + | --- matches all the relevant values |
| 50 | +... |
| 51 | +52 | b, |
| 52 | + | ^ no value can reach this |
46 | 53 |
|
47 | | -error: alias `c` already used by variant a |
48 | | - --> tests/ui/conflict/alias-enum.rs:50:5 |
| 54 | +warning: unreachable pattern |
| 55 | + --> tests/ui/conflict/alias-enum.rs:51:21 |
49 | 56 | | |
50 | | -50 | / /// Expected error on "alias c", because it is already used as alias of `a` |
51 | | -51 | | #[serde(alias = "c")] |
52 | | -52 | | b, |
53 | | - | |_____^ |
| 57 | +47 | #[serde(alias = "a", alias = "b", alias = "c")] |
| 58 | + | --- matches all the relevant values |
| 59 | +... |
| 60 | +51 | #[serde(alias = "c")] |
| 61 | + | ^^^ no value can reach this |
54 | 62 |
|
55 | | -error: alias `c` conflicts with deserialization name of other variant |
56 | | - --> tests/ui/conflict/alias-enum.rs:60:5 |
| 63 | +warning: unreachable pattern |
| 64 | + --> tests/ui/conflict/alias-enum.rs:65:22 |
57 | 65 | | |
58 | | -60 | / /// Expected error on "alias c", because this is a name of other variant after |
59 | | -61 | | /// applying rename rules |
60 | | -62 | | #[serde(alias = "b", alias = "c")] |
61 | | -63 | | a, |
62 | | - | |_____^ |
| 66 | +62 | #[serde(alias = "b", alias = "c")] |
| 67 | + | --- matches all the relevant values |
| 68 | +... |
| 69 | +65 | #[serde(rename = "c")] |
| 70 | + | ^^^ no value can reach this |
63 | 71 |
|
64 | | -error: alias `B` conflicts with deserialization name of other variant |
65 | | - --> tests/ui/conflict/alias-enum.rs:72:5 |
| 72 | +warning: unreachable pattern |
| 73 | + --> tests/ui/conflict/alias-enum.rs:76:5 |
66 | 74 | | |
67 | | -72 | / /// Expected error on "alias B", because this is a name of variant after |
68 | | -73 | | /// applying rename rules |
69 | | -74 | | #[serde(alias = "B", alias = "c")] |
70 | | -75 | | a, |
71 | | - | |_____^ |
| 75 | +74 | #[serde(alias = "B", alias = "c")] |
| 76 | + | --- matches all the relevant values |
| 77 | +75 | a, |
| 78 | +76 | b, |
| 79 | + | ^ no value can reach this |
0 commit comments