]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_expand/build.rs
Auto merge of #69474 - Dylan-DPC:rollup-ciotplu, r=Dylan-DPC
[rust.git] / src / librustc_expand / build.rs
index 8a53e1d1861aafcff3c19598bbdc75fceda786bd..bd6823cd4e275f586dbe26e39c00aadca1541c51 100644 (file)
@@ -644,7 +644,8 @@ 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, Some(expr)))
+        let def = ast::Defaultness::Final;
+        self.item(span, name, Vec::new(), ast::ItemKind::Const(def, ty, Some(expr)))
     }
 
     pub fn attribute(&self, mi: ast::MetaItem) -> ast::Attribute {