Improve error message for opaque captures

This commit is contained in:
Michael Goulet 2024-03-07 15:44:07 +00:00
parent 74acabe9b0
commit ffd30e0a69
25 changed files with 150 additions and 116 deletions

View file

@ -1607,3 +1607,15 @@ pub struct UnnamedFieldsReprFieldDefined {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_opaque_captures_higher_ranked_lifetime, code = E0657)]
pub struct OpaqueCapturesHigherRankedLifetime {
#[primary_span]
pub span: Span,
#[label]
pub label: Option<Span>,
#[note]
pub decl_span: Span,
pub bad_place: &'static str,
}