diff options
| author | George Bateman <george.bateman16@gmail.com> | 2024-01-02 22:12:35 +0000 |
|---|---|---|
| committer | George Bateman <george.bateman16@gmail.com> | 2024-01-02 22:18:35 +0000 |
| commit | 09bb07e38f5bfba4fa3e9ac3113e6b7e542e7c67 (patch) | |
| tree | affa65a7c263c446beb5071cf6432a9b97624dcb /compiler/rustc_parse/src/errors.rs | |
| parent | e51e98dde6a60637b6a71b8105245b629ac3fe77 (diff) | |
| download | rust-09bb07e38f5bfba4fa3e9ac3113e6b7e542e7c67.tar.gz rust-09bb07e38f5bfba4fa3e9ac3113e6b7e542e7c67.zip | |
Make offset_of field parsing use metavariable which handles any spacing
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index e276b34ca37..04d70872d78 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -2887,3 +2887,11 @@ pub(crate) struct TransposeDynOrImplSugg<'a> { pub insertion_span: Span, pub kw: &'a str, } + +#[derive(Diagnostic)] +#[diag(parse_array_index_offset_of)] +pub(crate) struct ArrayIndexInOffsetOf(#[primary_span] pub Span); + +#[derive(Diagnostic)] +#[diag(parse_invalid_offset_of)] +pub(crate) struct InvalidOffsetOf(#[primary_span] pub Span); |
