nameof icon indicating copy to clipboard operation
nameof copied to clipboard

Support `Self` or suppress `clippy::use_self` warning

Open mxk opened this issue 3 years ago • 1 comments

It's currently not possible to use name_of_type!(Self) to get the actual type name. If there is a way to support this, that would be great, but until then, it would be nice to automatically suppress clippy::use_self warning in the macro.

mxk avatar Nov 19 '22 18:11 mxk

stringify!(Self) will always return Self - instead you may be able to use std::any::type_name::<Self>()

MingweiSamuel avatar Aug 27 '24 18:08 MingweiSamuel