diff options
| author | Michael Baikov <manpacket@gmail.com> | 2024-05-22 09:26:02 -0400 |
|---|---|---|
| committer | Michael Baikov <manpacket@gmail.com> | 2024-05-24 07:23:30 -0400 |
| commit | d6e4fe569c84c6a9d20690f139ad15a3d3da9550 (patch) | |
| tree | 080880b0bf7f23de633e17bd4684927844f0e6a8 /compiler/rustc_resolve/src/errors.rs | |
| parent | 464987730ab36e3456ba57c53965372989382deb (diff) | |
| download | rust-d6e4fe569c84c6a9d20690f139ad15a3d3da9550.tar.gz rust-d6e4fe569c84c6a9d20690f139ad15a3d3da9550.zip | |
A custom error message for lending iterators
Diffstat (limited to 'compiler/rustc_resolve/src/errors.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/errors.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index edfeacec7e3..e9989b803e8 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -882,6 +882,15 @@ pub(crate) struct ElidedAnonymousLivetimeReportError { pub(crate) suggestion: Option<ElidedAnonymousLivetimeReportErrorSuggestion>, } +#[derive(Diagnostic)] +#[diag(resolve_lending_iterator_report_error)] +pub(crate) struct LendingIteratorReportError { + #[primary_span] + pub(crate) lifetime: Span, + #[note] + pub(crate) ty: Span, +} + #[derive(Subdiagnostic)] #[multipart_suggestion( resolve_elided_anonymous_lifetime_report_error_suggestion, |
