rust/compiler/rustc_expand/src
Nicholas Nethercote fd91925bce Add ErrorGuaranteed to Recovered::Yes and use it more.
The starting point for this was identical comments on two different
fields, in `ast::VariantData::Struct` and `hir::VariantData::Struct`:
```
    // FIXME: investigate making this a `Option<ErrorGuaranteed>`
    recovered: bool
```
I tried that, and then found that I needed to add an `ErrorGuaranteed`
to `Recovered::Yes`. Then I ended up using `Recovered` instead of
`Option<ErrorGuaranteed>` for these two places and elsewhere, which
required moving `ErrorGuaranteed` from `rustc_parse` to `rustc_ast`.

This makes things more consistent, because `Recovered` is used in more
places, and there are fewer uses of `bool` and
`Option<ErrorGuaranteed>`. And safer, because it's difficult/impossible
to set `recovered` to `Recovered::Yes` without having emitted an error.
2024-05-09 20:12:07 +10:00
..
mbe Refactor Frame. 2024-05-03 09:06:26 +10:00
base.rs Inline and remove three DummyResult methods. 2024-05-03 09:06:26 +10:00
build.rs Remove unused ExpCtxt methods. 2024-05-03 09:06:25 +10:00
config.rs Fix some comment formatting. 2024-05-03 09:06:26 +10:00
errors.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
expand.rs Rollup merge of #123344 - pietroalbini:pa-unused-imports, r=Nilstrieb 2024-05-08 23:33:24 +02:00
lib.rs Move some tests from rustc_expand to rustc_parse. 2024-05-06 09:06:02 +10:00
mbe.rs Remove unnecessary pubs. 2024-05-03 09:06:26 +10:00
module.rs Use do yeet () and do yeet _ instead of None? and Err(_)? in compiler 2024-03-15 11:37:42 +00:00
placeholders.rs Add ErrorGuaranteed to Recovered::Yes and use it more. 2024-05-09 20:12:07 +10:00
proc_macro_server.rs Rename ModSep to PathSep 2024-04-04 19:44:04 +02:00
proc_macro.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00