Simplify trait error message for CoercePointee validation
This commit is contained in:
parent
96d966b07a
commit
5c5ed92c37
6 changed files with 199 additions and 50 deletions
|
@ -1321,6 +1321,18 @@ pub(crate) struct CoerceSameStruct {
|
|||
pub target_path: String,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_coerce_unsized_field_validity)]
|
||||
pub(crate) struct CoerceFieldValidity<'tcx> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub ty: Ty<'tcx>,
|
||||
pub trait_name: &'static str,
|
||||
#[label]
|
||||
pub field_span: Span,
|
||||
pub field_ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_trait_cannot_impl_for_ty, code = E0204)]
|
||||
pub(crate) struct TraitCannotImplForTy {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue