-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
"variant is never constructed" lint appears to be incorrect? #64362
Copy link
Copy link
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This code (playground) causes a "variant is never constructed" lint, even though the variant is constructed in the
FromStrimplementation:Changing
Selffor the type name infrom_strforFoo(playground) compiles with the "field is never used" lint I would expect from this code.Tested on
rustc 1.39.0-nightly (0b36e9dea 2019-09-09)This issue has been assigned to @jakubadamw via this comment.