Commit 114380d
committed
Give
Currently, `Handler::fatal` returns `FatalError`. But `Session::fatal`
returns `!`, because it calls `Handler::fatal` and then calls `raise` on
the result. This inconsistency is unfortunate.
This commit changes `Handler::fatal` to do the `raise` itself, changing
its return type to `!`. This is safe because there are only two calls to
`Handler::fatal`, one in `rustc_session` and one in
`rustc_codegen_cranelift`, and they both call `raise` on the result.
`HandlerInner::fatal` still returns `FatalError`, so I renamed it
`fatal_no_raise` to emphasise the return type difference.Handler::fatal and Session::fatal the same return type.1 parent 71940e0 commit 114380d
File tree
3 files changed
+9
-8
lines changed- compiler
- rustc_codegen_cranelift/src
- rustc_errors/src
- rustc_session/src
3 files changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
1037 | | - | |
1038 | 1037 | | |
1039 | | - | |
1040 | | - | |
| 1038 | + | |
| 1039 | + | |
1041 | 1040 | | |
1042 | 1041 | | |
1043 | 1042 | | |
| |||
1469 | 1468 | | |
1470 | 1469 | | |
1471 | 1470 | | |
1472 | | - | |
| 1471 | + | |
1473 | 1472 | | |
1474 | 1473 | | |
1475 | | - | |
| 1474 | + | |
1476 | 1475 | | |
1477 | 1476 | | |
1478 | 1477 | | |
| |||
1631 | 1630 | | |
1632 | 1631 | | |
1633 | 1632 | | |
1634 | | - | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
1635 | 1636 | | |
1636 | 1637 | | |
1637 | 1638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
0 commit comments