diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-03 14:32:03 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-05 10:38:03 +1000 |
| commit | ecb2dd151c4d78fa9231f66e9c90dfef90dab4cc (patch) | |
| tree | 1348f2ceca1ceb7e9fe2611bb0712942c3af62be /tests/codegen/patchable-function-entry/patchable-function-entry-no-flag.rs | |
| parent | 5962aa96f1aad5c30e19119c6da0ea19e0588ea5 (diff) | |
| download | rust-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
