rust/compiler/rustc_ast/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
..
attr Rename NestedMetaItem::name_value_literal. 2024-04-24 16:28:34 +10:00
expand Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
util Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
ast.rs Add ErrorGuaranteed to Recovered::Yes and use it more. 2024-05-09 20:12:07 +10:00
ast_traits.rs Rename ast::StmtKind::Local into ast::StmtKind::Let 2024-03-14 12:42:04 +01:00
entry.rs Various improvements to entrypoint code 2024-05-04 14:48:42 +02:00
format.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
lib.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
mut_visit.rs Rollup merge of #123344 - pietroalbini:pa-unused-imports, r=Nilstrieb 2024-05-08 23:33:24 +02:00
node_id.rs Replace no_ord_impl with orderable. 2023-11-22 18:38:17 +11:00
ptr.rs rustc_ast: Update P<T> docs to reflect mutable status. 2024-04-03 08:41:03 +00:00
token.rs Return coherent description for boolean instead of panicking 2024-05-06 07:44:41 +02:00
tokenstream.rs compiler: derive Debug in parser 2024-05-07 19:09:39 -07:00
visit.rs Rollup merge of #123344 - pietroalbini:pa-unused-imports, r=Nilstrieb 2024-05-08 23:33:24 +02:00