You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is room for improvement on our DCA. For example, the screenshot below shows how rustc considers: A, T and f to be dead, because no "live code" actually uses them.
We, on the other hand, consider the mere presence of impls enough for them to not be dead.
Remove the impl and we now correctly mark this as dead. But the error message is not as clear as rustc's, which says the struct is never "constructed".
This is all done at sway-core/src/control_flow_analysis/dead_code_analysis.rs and seems a candidate for "good first issue".
The text was updated successfully, but these errors were encountered:
I think there is room for improvement on our DCA. For example, the screenshot below shows how
rustc
considers:A
,T
andf
to be dead, because no "live code" actually uses them.We, on the other hand, consider the mere presence of impls enough for them to not be dead.
Remove the impl and we now correctly mark this as dead. But the error message is not as clear as
rustc
's, which says the struct is never "constructed".This is all done at
sway-core/src/control_flow_analysis/dead_code_analysis.rs
and seems a candidate for "good first issue".The text was updated successfully, but these errors were encountered: