-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Warning about "type alias never used", but alias is used for impl block #43123
Comments
Nothing is public so I believe this is intentional. I complained about a similar case in the past, with enum variants used in private functions, and was told the |
However, a duplicate is #39531. |
I don't think that's a duplicate... in #39531, the functions indeed don't get used, to if you remove all of what "dead code" complains about, the resulting program still works. Here, I would need to refactor to make the lint go away. That seems silly. It not being public can't be the point either. Just adding a |
As I initially reported in #43328, struct definitions also aren't considered when determining if a type alias is used. |
Closing in favor of #18290. |
The following code
issues a warning in current stable and nightly:
However, the type alias is actually used -- if I remove it, the code stops compiling because the
impl
block references the alias. Hence, there should be no warning.The text was updated successfully, but these errors were encountered: