about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-01 14:08:10 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-04 15:42:06 +1100
commit114380d215931bef6037e2c9b16397a3071a1800 (patch)
treede6d7d38e1475ca559f7025c16113cde2c3ecd19 /compiler/rustc_codegen_gcc
parent71940e0a8a87ec685b338384ff5b4d98c3d926c1 (diff)
downloadrust-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