-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing
Description
When implementing a trait, clippy currently suggests making one of the functions const
. That is currently not possible. At least for now, it seems like this should be an exception.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
phansch commentedon Mar 4, 2019
That sounds like a bug, thanks! Could you provide an example that triggers the lint?
jhpratt commentedon Mar 4, 2019
@phansch Here's a simple example that actually has the error twice, once for the declared function, and one for the derived
Eq
trait.Output when running
cargo clippy
on the above example:Don't trigger missing_const_for_fn in external macros
Auto merge of #3844 - phansch:const_fn_external_macro, r=oli-obk
Don't trigger missing_const_for_fn in external macros