Repository navigation
#[deny(missing_docs)] ignores exported macro_rules! #56334
Description
Activity
- addedA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)T-langRelevant to the language teamRelevant to the language team
on Nov 30, 2018 cc @petrochenkov @rust-lang/lang I cannot decide whether this is expected behavior or not, but it makes sense that
missing_docsshould fire on exported macros.Preventing this code from compiling would likely break some backwards compatability
We don't guarantee backwards-compatibility for
#![deny(warnings)], otherwise we would never be able to introduce a new warning. I agree that missingdeny(missing_docs)should error on crate-exported macros with no documentation.Reacted by scottmcmLang team discussion agreed with the two comments above; the lint should warn for this.
Reacted by Mazdak FarrokhzadThis broke compilation of existing code in the rustc-perf benchmark suite, see rust-lang/rustc-perf#325
I see the comment "We don't guarantee backwards-compatibility for
#![deny(warnings)]" above, but I thought it might be useful to note some practical consequences.Reacted by Toby Dimmick@nnethercote Seems like that suite should set
-cap-lints=allow.
If my crate exports a
macro_rules!macro, thedeny(missing_docs)attribute has no effect even though it probably should.The following code should, at the very least, provide a warning
Preventing this code from compiling would likely break some backwards compatability, but I don't see why it shouldn't at least give a warning.