1
Fork 0

Parse generic const items

This commit is contained in:
León Orell Valerian Liehr 2023-05-04 16:08:33 +02:00
parent b6dd153fbc
commit afd009a8d8
No known key found for this signature in database
GPG key ID: D17A07215F68E713
12 changed files with 220 additions and 34 deletions

View file

@ -643,7 +643,16 @@ impl<'a> ExtCtxt<'a> {
span,
name,
AttrVec::new(),
ast::ItemKind::Const(ast::ConstItem { defaultness, ty, expr: Some(expr) }.into()),
ast::ItemKind::Const(
ast::ConstItem {
defaultness,
// FIXME(generic_const_items): Pass the generics as a parameter.
generics: ast::Generics::default(),
ty,
expr: Some(expr),
}
.into(),
),
)
}