clippy使用
EnumFlags
启用。
当带有write_literal
的结构时,Clippy警告我:EnumFlags
我如何摆脱此警告,而不会在全球范围内禁止警告?
warning: writing a literal with an empty format string
|
| #[derive(Copy, Clone, EnumFlags)]
| ^^^^^^^^^
|
= note: #[warn(write_literal)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.202/index.html#write_literal
没有在Proc-Macros上工作。 将您的宏输出在触发警告的相关代码行上输出
#[cfg_attr(feature = "cargo-clippy", allow(write_literal))]
#[allow()]