-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Deriving Clone and PartialEq on a type containing ! creates warnings #154900
Copy link
Copy link
Closed
Copy link
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.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)F-never_type`#![feature(never_type)]``#![feature(never_type)]`L-dead_codeLint: dead_codeLint: dead_codeL-unreachable_codeLint: unreachable_codeLint: unreachable_codeS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this 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.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)F-never_type`#![feature(never_type)]``#![feature(never_type)]`L-dead_codeLint: dead_codeLint: dead_codeL-unreachable_codeLint: unreachable_codeLint: unreachable_codeS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issue
Type
Fields
Give feedbackNo fields configured for Bug.
Given the following code:
I would expect no warnings to be emitted. Instead, both
CloneandPartialEqmacros emit unreachable code warnings: