A custom error message for lending iterators
This commit is contained in:
parent
464987730a
commit
d6e4fe569c
5 changed files with 74 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue