Add a Lint for Pointer to Integer Transmutes in Consts

This commit is contained in:
Veera
2024-09-22 19:32:56 -04:00
parent 5d9b908571
commit ab8673501c
10 changed files with 192 additions and 18 deletions

View File

@@ -121,3 +121,10 @@ pub(crate) struct MustNotSuspendReason {
pub span: Span,
pub reason: String,
}
#[derive(LintDiagnostic)]
#[diag(mir_transform_undefined_transmute)]
#[note]
#[note(mir_transform_note2)]
#[help]
pub(crate) struct UndefinedTransmute;