1
Fork 0

Migrate PanicNonStr, RawPtrComparison, RawPtrToInt diagnostics

This commit is contained in:
Michael Goulet 2022-06-28 22:46:25 -07:00
parent c48f482813
commit 584e5d4c4f
3 changed files with 41 additions and 23 deletions

View file

@ -39,3 +39,27 @@ pub(crate) struct StaticAccessErr {
#[help(const_eval::teach_help)]
pub teach: Option<()>,
}
#[derive(SessionDiagnostic)]
#[error(const_eval::raw_ptr_to_int)]
#[note]
#[note(const_eval::note2)]
pub(crate) struct RawPtrToIntErr {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
#[error(const_eval::raw_ptr_comparison)]
#[note]
pub(crate) struct RawPtrComparisonErr {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
#[error(const_eval::panic_non_str)]
pub(crate) struct PanicNonStrErr {
#[primary_span]
pub span: Span,
}