diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2024-05-07 14:43:23 +0200 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2024-06-04 14:19:43 -0300 |
| commit | bac72cf7cf823bbf10e7d093a8225490bf8d1350 (patch) | |
| tree | 099d8483538cf745a4b2e7040119c4ad890ae6aa /compiler/rustc_hir/src/def.rs | |
| parent | b4cbdb7246c633ab0ebc6ae4bbe4883cde79e787 (diff) | |
| download | rust-bac72cf7cf823bbf10e7d093a8225490bf8d1350.tar.gz rust-bac72cf7cf823bbf10e7d093a8225490bf8d1350.zip | |
Add safe/unsafe to static inside extern blocks
Diffstat (limited to 'compiler/rustc_hir/src/def.rs')
| -rw-r--r-- | compiler/rustc_hir/src/def.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs index 649a08b6972..b1854923247 100644 --- a/compiler/rustc_hir/src/def.rs +++ b/compiler/rustc_hir/src/def.rs @@ -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. |
