]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_expand/build.rs
Auto merge of #67330 - golddranks:split_inclusive, r=kodraus
[rust.git] / src / librustc_expand / build.rs
index 9030001542d75af1b818c3783c3de334284e0cda..8a53e1d1861aafcff3c19598bbdc75fceda786bd 100644 (file)
@@ -634,7 +634,7 @@ pub fn item_static(
         mutbl: ast::Mutability,
         expr: P<ast::Expr>,
     ) -> P<ast::Item> {
-        self.item(span, name, Vec::new(), ast::ItemKind::Static(ty, mutbl, expr))
+        self.item(span, name, Vec::new(), ast::ItemKind::Static(ty, mutbl, Some(expr)))
     }
 
     pub fn item_const(
@@ -644,7 +644,7 @@ pub fn item_const(
         ty: P<ast::Ty>,
         expr: P<ast::Expr>,
     ) -> P<ast::Item> {
-        self.item(span, name, Vec::new(), ast::ItemKind::Const(ty, expr))
+        self.item(span, name, Vec::new(), ast::ItemKind::Const(ty, Some(expr)))
     }
 
     pub fn attribute(&self, mi: ast::MetaItem) -> ast::Attribute {