diff options
| author | bors <bors@rust-lang.org> | 2023-11-20 11:24:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-20 11:24:28 +0000 |
| commit | 46ecc10c6951a2a0e52d93fe5d3acae9743e3ab9 (patch) | |
| tree | 3989c4c98f33267bb093b53e3f47867a3a65f43d /compiler/rustc_parse/src/errors.rs | |
| parent | 79e961fa728e543e9b4f8b44f6bc2550ea867d4d (diff) | |
| parent | 791ed333fb978d2b2822d4e32f33bed85277b7e2 (diff) | |
| download | rust-46ecc10c6951a2a0e52d93fe5d3acae9743e3ab9.tar.gz rust-46ecc10c6951a2a0e52d93fe5d3acae9743e3ab9.zip | |
Auto merge of #118082 - compiler-errors:rollup-ejsc8yd, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #117828 (Avoid iterating over hashmaps in astconv) - #117832 (interpret: simplify handling of shifts by no longer trying to handle signed and unsigned shift amounts in the same branch) - #117891 (Recover `dyn` and `impl` after `for<...>`) - #117957 (if available use a Child's pidfd for kill/wait) - #117988 (Handle attempts to have multiple `cfg`d tail expressions) - #117994 (Ignore but do not assume region obligations from unifying headers in negative coherence) - #118000 (Make regionck care about placeholders in outlives components) - #118068 (subtree update cg_gcc 2023/11/17) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 99e66fddc70..7ce348619c6 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -2827,3 +2827,23 @@ pub(crate) struct GenericArgsInPatRequireTurbofishSyntax { )] pub suggest_turbofish: Span, } + +#[derive(Diagnostic)] +#[diag(parse_transpose_dyn_or_impl)] +pub(crate) struct TransposeDynOrImpl<'a> { + #[primary_span] + pub span: Span, + pub kw: &'a str, + #[subdiagnostic] + pub sugg: TransposeDynOrImplSugg<'a>, +} + +#[derive(Subdiagnostic)] +#[multipart_suggestion(parse_suggestion, applicability = "machine-applicable")] +pub(crate) struct TransposeDynOrImplSugg<'a> { + #[suggestion_part(code = "")] + pub removal_span: Span, + #[suggestion_part(code = "{kw} ")] + pub insertion_span: Span, + pub kw: &'a str, +} |
