Migrate named_anon_conflict.rs
This commit is contained in:
parent
9b889e53e7
commit
8360a40a8a
3 changed files with 47 additions and 26 deletions
|
@ -357,8 +357,8 @@ impl AddToDiagnostic for LifetimeMismatchLabels {
|
|||
pub struct AddLifetimeParamsSuggestion<'a> {
|
||||
pub tcx: TyCtxt<'a>,
|
||||
pub sub: Region<'a>,
|
||||
pub ty_sup: &'a Ty<'a>,
|
||||
pub ty_sub: &'a Ty<'a>,
|
||||
pub ty_sup: &'a hir::Ty<'a>,
|
||||
pub ty_sub: &'a hir::Ty<'a>,
|
||||
pub add_note: bool,
|
||||
}
|
||||
|
||||
|
@ -520,3 +520,23 @@ pub struct MismatchedStaticLifetime<'a> {
|
|||
#[subdiagnostic]
|
||||
pub implicit_static_lifetimes: Vec<ImplicitStaticLifetimeSubdiag>,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[diag(infer::explicit_lifetime_required, code = "E0621")]
|
||||
pub struct ExplicitLifetimeRequired<'a> {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
pub ident_kind: &'static str,
|
||||
pub simple_ident: String,
|
||||
pub named: String,
|
||||
|
||||
#[suggestion(
|
||||
infer::explicit_lifetime_required_sugg,
|
||||
code = "{new_ty}",
|
||||
applicability = "unspecified"
|
||||
)]
|
||||
pub new_ty_span: Span,
|
||||
#[skip_arg]
|
||||
pub new_ty: Ty<'a>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue