diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-24 23:19:18 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-25 16:44:59 +0000 |
| commit | f8df298d74ad4a385ca0b14e65ae154a9b8fa5c5 (patch) | |
| tree | bf0f6bc685521a62d03fce16bfc9c81a2d604034 /compiler/rustc_expand/src | |
| parent | 2bf0c2df147e98ead4297ccc6a62b2f7f6c48c3e (diff) | |
| download | rust-f8df298d74ad4a385ca0b14e65ae154a9b8fa5c5.tar.gz rust-f8df298d74ad4a385ca0b14e65ae154a9b8fa5c5.zip | |
Allow defining opaques in statics and consts
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index ee7f68cc2f0..2c9b5f40d0d 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -698,8 +698,14 @@ impl<'a> ExtCtxt<'a> { name, AttrVec::new(), ast::ItemKind::Static( - ast::StaticItem { ty, safety: ast::Safety::Default, mutability, expr: Some(expr) } - .into(), + ast::StaticItem { + ty, + safety: ast::Safety::Default, + mutability, + expr: Some(expr), + define_opaque: None, + } + .into(), ), ) } @@ -723,6 +729,7 @@ impl<'a> ExtCtxt<'a> { generics: ast::Generics::default(), ty, expr: Some(expr), + define_opaque: None, } .into(), ), |
