about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-06-03 14:32:03 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-06-05 10:38:03 +1000
commit2d4e7df14422ec46422e79ddae5af3ed78632bef (patch)
treedae7ad79bc2563dba2fbef537305c58a707aa469 /tests/codegen/patchable-function-entry
parentb9037339cbc636349b02088486effa21f9ab16aa (diff)
downloadrust-2d4e7df14422ec46422e79ddae5af3ed78632bef.tar.gz
rust-2d4e7df14422ec46422e79ddae5af3ed78632bef.zip
rustfmt: Remove an unnecessary `catch_unwind` use.
The `Input::File` and `Input::Text` cases should be very similar.
However, currently the `Input::File` case uses `catch_unwind` because,
until recently (#125815) there was a fallible version of
`new_parser_from_source_str` but only an infallible version of
`new_parser_from_file`. This difference wasn't fundamental, just an
overlooked gap in the API of `rustc_parse`.

Both of those operations are now fallible, so the `Input::File` and
`Input::Text` cases can made more similar, with no need for
`catch_unwind`. This also lets us simplify an `Option<Vec<Diag>>` to
`Vec<Diag>`.
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions