rust/compiler/rustc_builtin_macros/src
Matthias Krüger 0a917f89f3
Rollup merge of #124919 - nnethercote:Recovered-Yes-ErrorGuaranteed, r=compiler-errors
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.

r? `@oli-obk`
2024-05-09 19:09:30 +02:00
..
assert store the span of the nested part of the use tree in the ast 2024-04-14 18:45:28 +02:00
deriving Auto merge of #124157 - wutchzone:partial_eq, r=estebank 2024-05-09 08:34:14 +00:00
format_foreign Use `as_deref` in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00
alloc_error_handler.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
asm.rs Move some functions from `rustc_expand` to `rustc_builtin_macros`. 2024-04-26 09:24:33 +10:00
assert.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
cfg.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
cfg_accessible.rs compiler: fix few needless_pass_by_ref_mut clippy lints 2024-03-28 12:04:00 +03:00
cfg_eval.rs Remove `extern crate tracing` from numerous crates. 2024-04-30 16:47:49 +10:00
cmdline_attrs.rs Rename all `ParseSess` variables/fields/lifetimes as `psess`. 2024-03-05 08:11:45 +11:00
compile_error.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
concat.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
concat_bytes.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
concat_idents.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
derive.rs Introduce `DeriveResolution`. 2024-04-26 07:55:21 +10:00
edition_panic.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
env.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
errors.rs Rollup merge of #124391 - nnethercote:builtin_macros-cleanups, r=fee1-dead 2024-04-26 19:25:55 -04:00
format.rs Rollup merge of #124919 - nnethercote:Recovered-Yes-ErrorGuaranteed, r=compiler-errors 2024-05-09 19:09:30 +02:00
format_foreign.rs unwrap return Option value, as it always returns Some for some fns 2023-11-28 14:52:21 +03:00
global_allocator.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
lib.rs Remove `extern crate tracing` from numerous crates. 2024-04-30 16:47:49 +10:00
log_syntax.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
pattern_type.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
proc_macro_harness.rs Rename consuming chaining methods on `DiagnosticBuilder`. 2024-01-10 07:40:00 +11:00
source_util.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
standard_library_imports.rs Rename all `ParseSess` variables/fields/lifetimes as `psess`. 2024-03-05 08:11:45 +11:00
test.rs Remove `extern crate tracing` from numerous crates. 2024-04-30 16:47:49 +10:00
test_harness.rs Various improvements to entrypoint code 2024-05-04 14:48:42 +02:00
trace_macros.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00
util.rs Adjust some `pub`s. 2024-04-26 13:29:20 +10:00