introduce CoercePointeeWellformed for coherence checks at typeck stage

This commit is contained in:
Ding Xiang Fei 2025-01-27 06:06:06 +08:00
parent 43ca9d18e3
commit de405dcb8f
No known key found for this signature in database
GPG key ID: 3CD748647EEF6359
15 changed files with 337 additions and 36 deletions

View file

@ -1180,6 +1180,28 @@ pub(crate) struct DispatchFromDynRepr {
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_coerce_pointee_not_struct, code = E0802)]
pub(crate) struct CoercePointeeNotStruct {
#[primary_span]
pub span: Span,
pub kind: String,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_coerce_pointee_not_concrete_ty, code = E0802)]
pub(crate) struct CoercePointeeNotConcreteType {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_coerce_pointee_not_transparent, code = E0802)]
pub(crate) struct CoercePointeeNotTransparent {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_inherent_ty_outside_relevant, code = E0390)]
#[help]