Open joshlf opened 6 months ago
I submitted https://github.com/rust-lang/rust/pull/124804 to add other well-known cfgs to thev list but it's not clear to me from the lint documentation if there is any interest in accepting additions not used by rustc/cargo, though to my mind accepting cfg(miri)
is a clear precedent.
I think doc_cfg
could be replaced by docsrs
, it's automatically inserted by docs.rs since https://github.com/rust-lang/docs.rs/pull/2390
As part of https://github.com/google/zerocopy/pull/1204, I discovered that the
unexpected_cfgs
lint fires on some standardcfg
s that are common in the ecosystem. The two I discovered so far are:doc_cfg
kani
(used by the Kani verifier)I've had to manually emit directives for these. It's not that onerous, but I could imagine it getting onerous especially for projects that don't already have a
build.rs
script.It would be good if the lint could be taught about some of the standard
cfg
s in the ecosystem to cut down on the noise.