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'm not sure if rust-analyzer is the right place to inform about a annoying inconsistency with some warnings. Please check the following two examples which are essentially the same:
Both are producing the same output but while the second one leaves rust-analyzer silenced, the first one is full with "debatable" warnings. I would expect the derived output to let the warnings be silenced as with the second example as the field gets indeed read.
If the "intentionally ignored" refers to this behavior: Is there any way to turn this "ignorance" off?
This is no real big issue but it clutters the sources code and I think it might confuse especially beginners. If you think that this should be addressed somewhere else: Please guide me.
BTW: I'm using nightly.
The text was updated successfully, but these errors were encountered:
Derived implementations of Clone and Debug always trivially read all fields, so "field is never read" dead code warnings are never triggered. Arguably, though, a user most likely will only be interested in whether their code ever reads those fields, which is the behavior I have implemented here.
Ok, thanks. So, I will close this issue for rust-analyzer.
FYI:
I know that I could turn off the warning, but I don't want to. In this instance I will just live with those warnings though I think it remains inconsistent even with the rationale in mind that you mentioned; given this rationale I'd expect - from a users point - the warning also on the second example.
I'm not sure if
rust-analyzer
is the right place to inform about a annoying inconsistency with some warnings. Please check the following two examples which are essentially the same:Both are producing the same output but while the second one leaves
rust-analyzer
silenced, the first one is full with "debatable" warnings. I would expect the derived output to let the warnings be silenced as with the second example as the field gets indeed read.If the "intentionally ignored" refers to this behavior: Is there any way to turn this "ignorance" off?
This is no real big issue but it clutters the sources code and I think it might confuse especially beginners. If you think that this should be addressed somewhere else: Please guide me.
BTW: I'm using nightly.
The text was updated successfully, but these errors were encountered: