Skip to content

Commit

Permalink
Remove warning comments (#5730)
Browse files Browse the repository at this point in the history
## Description
Removes comments added in #5704. The change setting None cases to true
is actually correct and what we want. @danielbate
  • Loading branch information
JoshuaBatty authored Mar 14, 2024
1 parent ddc420c commit 461bebe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
10 changes: 0 additions & 10 deletions sway-core/src/decl_engine/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
}
Expand All @@ -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,
});
)*
Expand Down
2 changes: 0 additions & 2 deletions sway-core/src/decl_engine/parsed_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
});
Expand Down
4 changes: 0 additions & 4 deletions sway-core/src/type_system/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,13 @@ 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
.write()
.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,
});
}
Expand Down

0 comments on commit 461bebe

Please sign in to comment.