Commit 3feac59
committed
Fix unreachable expression warning
Invert the order that we pass the arguments to the
`contract_check_ensures` function to avoid the warning when the tail
of the function is unreachable.
Note that the call itself is also unreachable, but we have already
handled that case by ignoring unreachable call for contract calls.1 parent b9754f9 commit 3feac59
File tree
16 files changed
+39
-66
lines changed- compiler
- rustc_ast_lowering/src
- rustc_hir_analysis/src/check
- library/core/src
- intrinsics
- tests/ui/contracts
- internal_machinery
16 files changed
+39
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
408 | | - | |
| 407 | + | |
409 | 408 | | |
410 | 409 | | |
411 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1212 | 1217 | | |
1213 | | - | |
| 1218 | + | |
1214 | 1219 | | |
1215 | 1220 | | |
1216 | 1221 | | |
| |||
1220 | 1225 | | |
1221 | 1226 | | |
1222 | 1227 | | |
| 1228 | + | |
| 1229 | + | |
1223 | 1230 | | |
1224 | 1231 | | |
1225 | 1232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
8 | 6 | | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | | - | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3453 | 3453 | | |
3454 | 3454 | | |
3455 | 3455 | | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
3456 | 3460 | | |
3457 | 3461 | | |
3458 | 3462 | | |
| |||
3478 | 3482 | | |
3479 | 3483 | | |
3480 | 3484 | | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
3481 | 3488 | | |
3482 | 3489 | | |
3483 | 3490 | | |
3484 | | - | |
| 3491 | + | |
3485 | 3492 | | |
3486 | | - | |
| 3493 | + | |
3487 | 3494 | | |
3488 | 3495 | | |
3489 | 3496 | | |
| |||
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 10 | + | |
22 | 11 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 10 | + | |
22 | 11 | | |
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 10 | + | |
22 | 11 | | |
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 10 | + | |
22 | 11 | | |
0 commit comments