Split out ast::ItemKind::Const into its own struct
This commit is contained in:
parent
e3828777a6
commit
ec74653652
14 changed files with 89 additions and 61 deletions
|
@ -638,8 +638,13 @@ impl<'a> ExtCtxt<'a> {
|
|||
ty: P<ast::Ty>,
|
||||
expr: P<ast::Expr>,
|
||||
) -> P<ast::Item> {
|
||||
let def = ast::Defaultness::Final;
|
||||
self.item(span, name, AttrVec::new(), ast::ItemKind::Const(def, ty, Some(expr)))
|
||||
let defaultness = ast::Defaultness::Final;
|
||||
self.item(
|
||||
span,
|
||||
name,
|
||||
AttrVec::new(),
|
||||
ast::ItemKind::Const(ast::ConstItem { defaultness, ty, expr: Some(expr) }),
|
||||
)
|
||||
}
|
||||
|
||||
// Builds `#[name]`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue