1
Fork 0

Forbid implicit nested statics in thread local statics

This commit is contained in:
Oli Scherer 2024-04-02 13:00:46 +00:00
parent 6c5c48e880
commit 64b75f736d
5 changed files with 29 additions and 19 deletions

View file

@ -25,6 +25,13 @@ pub(crate) struct DanglingPtrInFinal {
pub kind: InternKind,
}
#[derive(Diagnostic)]
#[diag(const_eval_nested_static_in_thread_local)]
pub(crate) struct NestedStaticInThreadLocal {
#[primary_span]
pub span: Span,
}
#[derive(LintDiagnostic)]
#[diag(const_eval_mutable_ptr_in_final)]
pub(crate) struct MutablePtrInFinal {