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_expand/src | |
| parent | b4cbdb7246c633ab0ebc6ae4bbe4883cde79e787 (diff) | |
| download | rust-bac72cf7cf823bbf10e7d093a8225490bf8d1350.tar.gz rust-bac72cf7cf823bbf10e7d093a8225490bf8d1350.zip | |
Add safe/unsafe to static inside extern blocks
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index 1b6e191c2eb..b3d41908260 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -631,7 +631,10 @@ impl<'a> ExtCtxt<'a> { span, name, AttrVec::new(), - ast::ItemKind::Static(ast::StaticItem { ty, mutability, expr: Some(expr) }.into()), + ast::ItemKind::Static( + ast::StaticItem { ty, safety: ast::Safety::Default, mutability, expr: Some(expr) } + .into(), + ), ) } |
