diff --git a/sway-core/src/decl_engine/engine.rs b/sway-core/src/decl_engine/engine.rs index 1aad8e09ef3..cf1bc2318a0 100644 --- a/sway-core/src/decl_engine/engine.rs +++ b/sway-core/src/decl_engine/engine.rs @@ -190,23 +190,15 @@ macro_rules! decl_engine_clear_module { self.parents.write().unwrap().retain(|key, _| { match key { AssociatedItemDeclId::TraitFn(decl_id) => { - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 self.get_trait_fn(decl_id).span().source_id().map_or(true, |src_id| &src_id.module_id() != module_id) }, AssociatedItemDeclId::Function(decl_id) => { - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 self.get_function(decl_id).span().source_id().map_or(true, |src_id| &src_id.module_id() != module_id) }, AssociatedItemDeclId::Type(decl_id) => { - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 self.get_type(decl_id).span().source_id().map_or(true, |src_id| &src_id.module_id() != module_id) }, AssociatedItemDeclId::Constant(decl_id) => { - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 self.get_constant(decl_id).span().source_id().map_or(true, |src_id| &src_id.module_id() != module_id) }, } @@ -215,8 +207,6 @@ macro_rules! decl_engine_clear_module { $( self.$slab.retain(|_k, ty| match ty.span().source_id() { Some(source_id) => &source_id.module_id() != module_id, - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 None => true, }); )* diff --git a/sway-core/src/decl_engine/parsed_engine.rs b/sway-core/src/decl_engine/parsed_engine.rs index a1a2c49fbb0..463117735fd 100644 --- a/sway-core/src/decl_engine/parsed_engine.rs +++ b/sway-core/src/decl_engine/parsed_engine.rs @@ -142,8 +142,6 @@ macro_rules! decl_engine_clear_module { let span = $getter(item); match span.source_id() { Some(source_id) => &source_id.module_id() != module_id, - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 None => true, } }); diff --git a/sway-core/src/type_system/engine.rs b/sway-core/src/type_system/engine.rs index d7498c741d1..53514b99b35 100644 --- a/sway-core/src/type_system/engine.rs +++ b/sway-core/src/type_system/engine.rs @@ -72,8 +72,6 @@ impl TypeEngine { pub fn clear_module(&mut self, module_id: &ModuleId) { self.slab.retain(|_, tsi| match tsi.source_id { Some(source_id) => &source_id.module_id() != module_id, - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 None => true, }); self.id_map @@ -81,8 +79,6 @@ impl TypeEngine { .unwrap() .retain(|tsi, _| match tsi.source_id { Some(source_id) => &source_id.module_id() != module_id, - // WARNING: Setting to true disables garbage collection for these cases. - // This should be set back to false once this issue is solved: https://github.com/FuelLabs/sway/issues/5698 None => true, }); }