diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-01 14:08:10 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-04 15:42:06 +1100 |
| commit | 114380d215931bef6037e2c9b16397a3071a1800 (patch) | |
| tree | de6d7d38e1475ca559f7025c16113cde2c3ecd19 /compiler/rustc_codegen_gcc | |
| parent | 71940e0a8a87ec685b338384ff5b4d98c3d926c1 (diff) | |
| download | rust-114380d215931bef6037e2c9b16397a3071a1800.tar.gz rust-114380d215931bef6037e2c9b16397a3071a1800.zip | |
Give `Handler::fatal` and `Session::fatal` the same return type.
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
