I'm adding a new feature, and the first thing I did is create a type alias. The compiler didn't give me a warning that it wasn't used. Is there a reason?
pub type SNAKEY = bool;
I did a global search for SNAKEY and found only the one occurrence. I get the warning if I remove pub.
Because it's pub
, maybe someone is using it outside the current file, etc. You also won't get other dead code warnings, like for unused fields or structs, if they are pub
.
(I.e. it's not a global analysis.)
1 Like
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.