diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-02 13:00:46 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-02 13:00:46 +0000 |
| commit | 64b75f736ddaf10887a508941ab7dea9a67d01d4 (patch) | |
| tree | 112874253d76ae8f8f777800270fa4dcef6388fc /compiler/rustc_const_eval/src/errors.rs | |
| parent | 6c5c48e880ca0668c5c8a8029769636831985137 (diff) | |
| download | rust-64b75f736ddaf10887a508941ab7dea9a67d01d4.tar.gz rust-64b75f736ddaf10887a508941ab7dea9a67d01d4.zip | |
Forbid implicit nested statics in thread local statics
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/errors.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index 5c46ec799f1..a60cedd6500 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -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 { |
