about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/build.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2023-05-04 16:08:33 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2023-07-28 22:21:33 +0200
commitafd009a8d8a8fea07cfee279817c75427b707778 (patch)
tree86ab1a1c08087cbff8615617bc350447b8ed2e65 /compiler/rustc_expand/src/build.rs
parentb6dd153fbcc06b3bc936aca800af4b8376c229e4 (diff)
downloadrust-afd009a8d8a8fea07cfee279817c75427b707778.tar.gz
rust-afd009a8d8a8fea07cfee279817c75427b707778.zip
Parse generic const items
Diffstat (limited to 'compiler/rustc_expand/src/build.rs')
-rw-r--r--compiler/rustc_expand/src/build.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs
index 264f30fb10a..7de46994434 100644
--- a/compiler/rustc_expand/src/build.rs
+++ b/compiler/rustc_expand/src/build.rs
@@ -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(),
+            ),
         )
     }