rust/src
Nicholas Nethercote ecb2dd151c 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>`.
2024-06-05 10:38:03 +10:00
..
attr Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
bin Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
cargo-fmt Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
config remove redundant imports 2023-12-10 10:56:22 +08:00
emitter remove redundant imports 2023-12-10 10:56:22 +08:00
format-diff Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
formatting Merge commit 'efa8f5521d' into rustfmt-subtree 2021-10-20 00:11:59 -05:00
git-rustfmt Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
modules Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
parse rustfmt: Remove an unnecessary catch_unwind use. 2024-06-05 10:38:03 +10:00
test Move emit_stashed_diagnostic call in rustfmt. 2024-02-26 10:45:45 +11:00
attr.rs Rename ast::StmtKind::Local into ast::StmtKind::Let 2024-03-14 12:42:04 +01:00
chains.rs Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
closures.rs Plumb awaitness of for loops 2023-12-19 12:26:20 -08:00
comment.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
coverage.rs Implement closing-block procedure without relying on missed_span module (#3691) 2019-07-17 23:07:12 +09:00
emitter.rs Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
expr.rs Add basic rustfmt implementation & test 2024-03-06 00:51:45 -05:00
format_report_formatter.rs Merge commit '7b73b60fac' into sync-rustfmt 2022-06-12 22:03:05 -05:00
formatting.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
ignore_path.rs remove redundant imports 2023-12-10 10:56:22 +08:00
imports.rs store the span of the nested part of the use tree in the ast 2024-04-14 18:45:28 +02:00
items.rs Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
lib.rs Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
lists.rs Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
macros.rs Rename ModSep to PathSep 2024-04-04 19:44:04 +02:00
matches.rs Add basic rustfmt implementation & test 2024-03-06 00:51:45 -05:00
missed_spans.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
modules.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
overflow.rs Plumb awaitness of for loops 2023-12-19 12:26:20 -08:00
pairs.rs Rework ast::BinOpKind::to_string and ast::UnOp::to_string. 2023-11-28 09:42:07 +11:00
patterns.rs Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
release_channel.rs Move macro to separate module 2019-05-17 16:13:46 +02:00
reorder.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
rewrite.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
rustfmt_diff.rs Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
shape.rs Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
skip.rs Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
source_file.rs step cfgs 2024-03-20 08:49:13 -04:00
source_map.rs refactor: backport syntux mod 2020-03-26 21:25:34 -05:00
spanned.rs Rename ast::StmtKind::Local into ast::StmtKind::Let 2024-03-14 12:42:04 +01:00
stmt.rs Rename ast::StmtKind::Local into ast::StmtKind::Let 2024-03-14 12:42:04 +01:00
string.rs Merge commit '81fe905ca8' into rustfmt-sync 2023-10-22 20:21:44 -05:00
syntux.rs refactor: backport syntux mod 2020-03-26 21:25:34 -05:00
types.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
utils.rs Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
vertical.rs Merge commit '5ff7b632a9' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00
visitor.rs Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00