1
Fork 0

Add safe/unsafe to static inside extern blocks

This commit is contained in:
Santiago Pastorino 2024-05-07 14:43:23 +02:00
parent b4cbdb7246
commit bac72cf7cf
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
27 changed files with 152 additions and 57 deletions

View file

@ -76,6 +76,8 @@ pub enum DefKind {
/// Constant generic parameter: `struct Foo<const N: usize> { ... }`
ConstParam,
Static {
/// Whether it's a `unsafe static`, `safe static` (inside extern only) or just a `static`.
safety: hir::Safety,
/// Whether it's a `static mut` or just a `static`.
mutability: ast::Mutability,
/// Whether it's an anonymous static generated for nested allocations.