about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
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
commit0657c1b932d46b37ff5326d945f83cc52c103869 (patch)
tree8445d914232261d3c06f1cf5609a59b57392db74 /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent400cd47c288a273a38d63eb88d15d54dc72fbbbb (diff)
downloadrust-0657c1b932d46b37ff5326d945f83cc52c103869.tar.gz
rust-0657c1b932d46b37ff5326d945f83cc52c103869.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 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions