about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry/patchable-function-entry-no-flag.rs
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
commitecb2dd151c4d78fa9231f66e9c90dfef90dab4cc (patch)
tree1348f2ceca1ceb7e9fe2611bb0712942c3af62be /tests/codegen/patchable-function-entry/patchable-function-entry-no-flag.rs
parent5962aa96f1aad5c30e19119c6da0ea19e0588ea5 (diff)
downloadrust-ecb2dd151c4d78fa9231f66e9c90dfef90dab4cc.tar.gz
rust-ecb2dd151c4d78fa9231f66e9c90dfef90dab4cc.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/patchable-function-entry-no-flag.rs')
0 files changed, 0 insertions, 0 deletions