deny(warning)
is not an anti-pattern for libs
#260
Labels
A-anti_pattern
Area: Content about Anti-Patterns
C-amendment
Category: Amendments to existing content
C-needs discussion
Area: Something that is not clear to everyone if it fixes something/adds valuable content
C-outdated
Category: Content that is outdated and needs a rework
good first issue
Good for newcomers
The main reason why
deny(warning)
is considered an antipattern, according to the patterns guide, is that a crate author opts out of Rust's stability guarantees, since Rust is allowed to add new warnings to new versions. Thus, new versions of rust may break the crate.However, rust currently caps the the max lint level to "warn" when building dependencies. Thus, even if a crate specifies
#![deny(warning)]
, the warnings will not be upgraded to denies when it is built as a dependency. See this comment:As such,
deny(warning)
is actually an entirely fine pattern for libraries to use. It may be worth amending thedeny(warning)
antipattern crate to explain that it only applies to binary crates.CC #46
The text was updated successfully, but these errors were encountered: