Peternator7 / strum

A small rust library for adding custom derives to enums
https://crates.io/crates/strum
MIT License
1.66k stars 141 forks source link

clippy::use_self #238

Open orenbenkiki opened 1 year ago

orenbenkiki commented 1 year ago

The new clippy::use_self warning (in clippy::nursery) is triggered when using derive macros such as AsRefStr and/or EnumString. It seems clippy is/will become more pedantic when it comes to using Self instead of the struct name, even inside procedural macros. Right now I just disabled the warning, but I'd like to be able to turn it on in general for my own code.

Peternator7 commented 1 year ago

iirc, we can't use Self in a number of places because earlier versions of rust didn't support Self in a number of positions historically. If you send a PR adding #[allow(..)] for the new lints, I'll get it merged and push a patch version