-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected dead_code warning when returning Result type from main #123418
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@rustbot claim |
This is the same diagnostic issue as #123068 to which I am assigned I believe. @long-long-float I haven't started working on it yet, so you can take both if you want. |
As discussed in #88900, this behavior is intentional. However there is a bug not to show an explanation about this behavior. I fixed the bug at #124460 and the message will be shown.
|
Triage: long-long-float added a remark (thank you!), but the behavior here is intentional as per Ignore derived Clone and Debug implementations during dead code analysis #85200, which was FCP'd by T-lang in #85200 (comment). This is also a duplicate of #88900. In particular, there is a remark in the diagnostics now after long-long-float's contribution:
Hence, I am going to close this as a duplicate of #88900. Thank you for the report and long-long-float for the diagnostics improvements. |
I tried this code:
I expect this to behave like so:
What I get is:
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: