1
Fork 0

Allow defining opaques in statics and consts

This commit is contained in:
Michael Goulet 2025-03-24 23:19:18 +00:00
parent 2bf0c2df14
commit f8df298d74
17 changed files with 314 additions and 162 deletions

View file

@ -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(),
),