|
1 | | -error: arbitrary expressions aren't allowed in patterns |
2 | | - --> $DIR/in-pat-recovery.rs:6:9 |
| 1 | +error: const blocks cannot be used as patterns |
| 2 | + --> $DIR/in-pat-recovery.rs:6:15 |
3 | 3 | | |
4 | 4 | LL | const { 1 + 7 } => {} |
5 | | - | ^^^^^^^^^^^^^^^ |
| 5 | + | ^^^^^^^^^ |
6 | 6 | | |
7 | 7 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
8 | 8 |
|
9 | | -error: arbitrary expressions aren't allowed in patterns |
10 | | - --> $DIR/in-pat-recovery.rs:13:9 |
| 9 | +error: const blocks cannot be used as patterns |
| 10 | + --> $DIR/in-pat-recovery.rs:13:15 |
11 | 11 | | |
12 | 12 | LL | const { 1 } ..= 10 => {} |
13 | | - | ^^^^^^^^^^^ |
| 13 | + | ^^^^^ |
14 | 14 | | |
15 | 15 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
16 | 16 |
|
17 | | -error: arbitrary expressions aren't allowed in patterns |
18 | | - --> $DIR/in-pat-recovery.rs:19:15 |
| 17 | +error: const blocks cannot be used as patterns |
| 18 | + --> $DIR/in-pat-recovery.rs:19:21 |
19 | 19 | | |
20 | 20 | LL | 1 ..= const { 10 } => {} |
21 | | - | ^^^^^^^^^^^^ |
| 21 | + | ^^^^^^ |
22 | 22 | | |
23 | 23 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
24 | 24 |
|
25 | | -error: arbitrary expressions aren't allowed in patterns |
26 | | - --> $DIR/in-pat-recovery.rs:25:9 |
| 25 | +error: const blocks cannot be used as patterns |
| 26 | + --> $DIR/in-pat-recovery.rs:25:15 |
27 | 27 | | |
28 | 28 | LL | const { 1 } ..= const { 10 } => {} |
29 | | - | ^^^^^^^^^^^ |
| 29 | + | ^^^^^ |
30 | 30 | | |
31 | 31 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
32 | 32 |
|
33 | | -error: arbitrary expressions aren't allowed in patterns |
34 | | - --> $DIR/in-pat-recovery.rs:25:25 |
| 33 | +error: const blocks cannot be used as patterns |
| 34 | + --> $DIR/in-pat-recovery.rs:25:31 |
35 | 35 | | |
36 | 36 | LL | const { 1 } ..= const { 10 } => {} |
37 | | - | ^^^^^^^^^^^^ |
| 37 | + | ^^^^^^ |
38 | 38 | | |
39 | 39 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
40 | 40 |
|
41 | | -error: arbitrary expressions aren't allowed in patterns |
42 | | - --> $DIR/in-pat-recovery.rs:32:9 |
| 41 | +error: const blocks cannot be used as patterns |
| 42 | + --> $DIR/in-pat-recovery.rs:32:15 |
43 | 43 | | |
44 | 44 | LL | const { 1 } .. 10 => {} |
45 | | - | ^^^^^^^^^^^ |
| 45 | + | ^^^^^ |
46 | 46 | | |
47 | 47 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
48 | 48 |
|
49 | | -error: arbitrary expressions aren't allowed in patterns |
50 | | - --> $DIR/in-pat-recovery.rs:38:14 |
| 49 | +error: const blocks cannot be used as patterns |
| 50 | + --> $DIR/in-pat-recovery.rs:38:20 |
51 | 51 | | |
52 | 52 | LL | 1 .. const { 10 } => {} |
53 | | - | ^^^^^^^^^^^^ |
| 53 | + | ^^^^^^ |
54 | 54 | | |
55 | 55 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
56 | 56 |
|
57 | | -error: arbitrary expressions aren't allowed in patterns |
58 | | - --> $DIR/in-pat-recovery.rs:44:9 |
| 57 | +error: const blocks cannot be used as patterns |
| 58 | + --> $DIR/in-pat-recovery.rs:44:15 |
59 | 59 | | |
60 | 60 | LL | const { 1 + 2 } ..= 10 => {} |
61 | | - | ^^^^^^^^^^^^^^^ |
| 61 | + | ^^^^^^^^^ |
62 | 62 | | |
63 | 63 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
64 | 64 |
|
65 | | -error: arbitrary expressions aren't allowed in patterns |
66 | | - --> $DIR/in-pat-recovery.rs:50:15 |
| 65 | +error: const blocks cannot be used as patterns |
| 66 | + --> $DIR/in-pat-recovery.rs:50:21 |
67 | 67 | | |
68 | 68 | LL | 1 ..= const { 5 + 5 } => {} |
69 | | - | ^^^^^^^^^^^^^^^ |
| 69 | + | ^^^^^^^^^ |
70 | 70 | | |
71 | 71 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
72 | 72 |
|
73 | | -error: arbitrary expressions aren't allowed in patterns |
74 | | - --> $DIR/in-pat-recovery.rs:56:9 |
| 73 | +error: const blocks cannot be used as patterns |
| 74 | + --> $DIR/in-pat-recovery.rs:56:15 |
75 | 75 | | |
76 | 76 | LL | const { 3 } .. => {} |
77 | | - | ^^^^^^^^^^^ |
| 77 | + | ^^^^^ |
78 | 78 | | |
79 | 79 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
80 | 80 |
|
81 | | -error: arbitrary expressions aren't allowed in patterns |
82 | | - --> $DIR/in-pat-recovery.rs:62:13 |
| 81 | +error: const blocks cannot be used as patterns |
| 82 | + --> $DIR/in-pat-recovery.rs:62:19 |
83 | 83 | | |
84 | 84 | LL | ..= const { 7 } => {} |
85 | | - | ^^^^^^^^^^^ |
| 85 | + | ^^^^^ |
86 | 86 | | |
87 | 87 | = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead |
88 | 88 |
|
|
0 commit comments