about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/build.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-03-29 09:20:45 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-04-04 09:44:50 +0000
commitec74653652e59fc209506c084357ccee922a2d73 (patch)
treeaa3b502664d0028db8443f96466d856942bc853a /compiler/rustc_expand/src/build.rs
parente3828777a6b669c33fc59f2bddde44e888d304af (diff)
downloadrust-ec74653652e59fc209506c084357ccee922a2d73.tar.gz
rust-ec74653652e59fc209506c084357ccee922a2d73.zip
Split out ast::ItemKind::Const into its own struct
Diffstat (limited to 'compiler/rustc_expand/src/build.rs')
-rw-r--r--compiler/rustc_expand/src/build.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs
index e184f732090..39fed9fdd0d 100644
--- a/compiler/rustc_expand/src/build.rs
+++ b/compiler/rustc_expand/src/build.rs
@@ -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]`.