Migrate MutDeref, TransientMutBorrow diagnostics

This commit is contained in:
Michael Goulet 2022-06-28 23:22:15 -07:00
parent 584e5d4c4f
commit f97f2a47ff
4 changed files with 69 additions and 19 deletions

View file

@ -63,3 +63,27 @@ pub(crate) struct PanicNonStrErr {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
#[error(const_eval::mut_deref, code = "E0658")]
pub(crate) struct MutDerefErr {
#[primary_span]
pub span: Span,
pub kind: ConstContext,
}
#[derive(SessionDiagnostic)]
#[error(const_eval::transient_mut_borrow, code = "E0658")]
pub(crate) struct TransientMutBorrowErr {
#[primary_span]
pub span: Span,
pub kind: ConstContext,
}
#[derive(SessionDiagnostic)]
#[error(const_eval::transient_mut_borrow_raw, code = "E0658")]
pub(crate) struct TransientMutBorrowErrRaw {
#[primary_span]
pub span: Span,
pub kind: ConstContext,
}