rust/compiler/rustc_parse/src/parser
Yuki Okushi d126de111b
Rollup merge of #97166 - nnethercote:move-conditions-out, r=estebank
Move conditions out of recover/report functions.

`Parser` has six recover/report functions that are passed a boolean, and
nothing is done if the boolean has a particular value.

This PR moves the tests outside the functions. This has the following effects.
- The number of lines of code goes down.
- Some `use` items become shorter.
- Avoids the strangeness whereby 11 out of 12 calls to
  `maybe_recover_from_bad_qpath` pass `true` as the second argument.
- Makes it clear at the call site that only one of
  `maybe_recover_from_bad_type_plus` and `maybe_report_ambiguous_plus` will be
  run.

r? `@estebank`
2022-06-02 06:44:27 +09:00
..
attr.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
attr_wrapper.rs ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
diagnostics.rs Rollup merge of #97166 - nnethercote:move-conditions-out, r=estebank 2022-06-02 06:44:27 +09:00
expr.rs Rollup merge of #97166 - nnethercote:move-conditions-out, r=estebank 2022-06-02 06:44:27 +09:00
generics.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
item.rs Rollup merge of #97172 - SparrowLii:unsafe_extern, r=compiler-errors 2022-05-30 15:57:27 -07:00
mod.rs Merge crate and restricted visibilities 2022-05-21 17:02:55 -04:00
nonterminal.rs ast: Introduce some traits to get AST node properties generically 2022-05-11 12:43:27 +03:00
pat.rs Move condition out of maybe_recover_unexpected_comma. 2022-05-19 16:53:23 +10:00
path.rs rustc_ast: Harmonize delimiter naming with proc_macro::Delimiter 2022-04-28 10:04:29 +03:00
stmt.rs Rollup merge of #97166 - nnethercote:move-conditions-out, r=estebank 2022-06-02 06:44:27 +09:00
ty.rs Rollup merge of #97166 - nnethercote:move-conditions-out, r=estebank 2022-06-02 06:44:27 +09:00