rust/clippy_lints
Catherine Flores 18061e2c42
incompatible_msrv: lint function calls with any argument count (#14216)
The lint for function calls was previously restricted to functions
taking exactly one argument. This was not documented.

Generalizing the lint to an arbitrary number of arguments in the
function call requires special casing some macro expansions from the
standard library. Macros such as `panic!()` or `assert_eq!()` exist
since Rust 1.0.0, but modern stdlib expand those macros into calls to
functions introduced in later Rust versions. While it is desirable to
lint code inside macros, using MSRV-incompatible functions coming from
`core` in macro expansions has been special-cased to not trigger this
lint.

Also, code coming from compiler desugaring may contain function calls
(for example, `a..=b` is now desugared into `RangeInclusive::new(a, b)`.
Those should not be linted either as the compiler is allowed to use
unstable function calls.

Fix #14212

changelog: [`incompatible_msrv`]: lint function calls with any argument
count
2025-03-13 04:11:42 +00:00
..
src incompatible_msrv: lint function calls with any argument count (#14216) 2025-03-13 04:11:42 +00:00
Cargo.toml Bump Clippy version -> 0.1.87 2025-02-20 15:26:51 +01:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.