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

@@ -3535,6 +3535,7 @@ pub struct StaticItem {
pub safety: Safety,
pub mutability: Mutability,
pub expr: Option<P<Expr>>,
pub define_opaque: Option<ThinVec<(NodeId, Path)>>,
}
#[derive(Clone, Encodable, Decodable, Debug)]
@@ -3543,6 +3544,7 @@ pub struct ConstItem {
pub generics: Generics,
pub ty: P<Ty>,
pub expr: Option<P<Expr>>,
pub define_opaque: Option<ThinVec<(NodeId, Path)>>,
}
// Adding a new variant? Please update `test_item` in `tests/ui/macros/stringify.rs`.