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
Due to https://github.com/astro/deadnix/blob/main/src/scope.rs#L105, lambda arguments starting with _ are always allowed, even without --no-underscore. This behaviour is different from other bindings, e.g. let _foo = 23; in …, where --no-underscore is necessary, and thus unexpected. I suggest to either change this to name.syntax().text() != "_" or remove this flag and always allow symbols starting with _, even in let-bindings, which is the default in many programming languages including rust.
The text was updated successfully, but these errors were encountered:
The LambdaArg case however is a bit special because it cannot be removed entirely. Renaming them to _ makes code less self-explanatory. I'd like to reconsider about that for a few days.
Against the alternative proposal, I think finding dead declarations that start with _ is very useful.
Due to https://github.com/astro/deadnix/blob/main/src/scope.rs#L105, lambda arguments starting with
_
are always allowed, even without--no-underscore
. This behaviour is different from other bindings, e.g.let _foo = 23; in …
, where--no-underscore
is necessary, and thus unexpected. I suggest to either change this toname.syntax().text() != "_"
or remove this flag and always allow symbols starting with_
, even in let-bindings, which is the default in many programming languages including rust.The text was updated successfully, but these errors were encountered: