• Miguel Ojeda's avatar
    rust: relax most deny-level lints to warnings · f8f88aa2
    Miguel Ojeda authored
    Since we are starting to support several Rust toolchains, lints (including
    Clippy ones) now may behave differently and lint groups may include
    new lints.
    
    Therefore, to maximize the chances a given version works, relax some
    deny-level lints to warnings. It may also make our lives a bit easier
    while developing new code or refactoring.
    
    To be clear, the requirements for in-tree code are still the same, since
    Rust code still needs to be warning-free (patches should be clean under
    `WERROR=y`) and the set of lints is not changed.
    
    `unsafe_op_in_unsafe_fn` is left unmodified, i.e. as an error, since it is
    becoming the default in the language (warn-by-default in Rust 2024 [1] and
    ideally an error later on) and thus it should also be very well tested. In
    addition, it is simple enough that it should not have false positives
    (unlike e.g. `rust_2018_idioms`'s `explicit_outlives_requirements`).
    
    `non_ascii_idents` is left unmodified as well, i.e. as an error, since
    it is unlikely one gains any productivity during development if it
    were a warning (in fact, it may be worse, since it is likely one made
    a typo). In addition, it should not have false positives.
    
    Finally, put the two `-D` ones at the top and take the chance to do one
    per line.
    
    Link: https://github.com/rust-lang/rust/pull/112038 [1]
    Reviewed-by: default avatarFinn Behrens <me@kloenk.dev>
    Tested-by: default avatarBenno Lossin <benno.lossin@proton.me>
    Tested-by: default avatarAndreas Hindborg <a.hindborg@samsung.com>
    Link: https://lore.kernel.org/r/20240709160615.998336-5-ojeda@kernel.orgSigned-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
    f8f88aa2
Makefile 16.7 KB