]> git.lizzy.rs Git - rust.git/blobdiff - crates/hir_def/src/item_tree.rs
Add ConstParams to the HIR
[rust.git] / crates / hir_def / src / item_tree.rs
index 100dbf5d6571ced6fcae71ef81722b2ecc244c74..b6f5107313402dac07ed9037f277508c7ff0d188 100644 (file)
@@ -260,6 +260,7 @@ impl GenericParamsStorage {
     fn alloc(&mut self, params: GenericParams) -> GenericParamsId {
         if params.types.is_empty()
             && params.lifetimes.is_empty()
+            && params.consts.is_empty()
             && params.where_predicates.is_empty()
         {
             return GenericParamsId::EMPTY;
@@ -269,8 +270,12 @@ fn alloc(&mut self, params: GenericParams) -> GenericParamsId {
     }
 }
 
-static EMPTY_GENERICS: GenericParams =
-    GenericParams { types: Arena::new(), lifetimes: Arena::new(), where_predicates: Vec::new() };
+static EMPTY_GENERICS: GenericParams = GenericParams {
+    types: Arena::new(),
+    lifetimes: Arena::new(),
+    consts: Arena::new(),
+    where_predicates: Vec::new(),
+};
 
 #[derive(Default, Debug, Eq, PartialEq)]
 struct ItemTreeData {