Skip to content

Commit 55bae53

Browse files
committed
rust: give Clippy the minimum supported Rust version
Clippy has lints that refer to features in the language and library that may not exist in the minimum version a given project supports. Thus it offers the `msrv` field to avoid that. For instance, Clippy should not suggest using `let ... else` in a lint if the MSRV did not implement that syntax. Currently, there should be no effect setting it, since there is no lint that we currently enable that is affected by `msrv` [1] lower than our minimum supported Rust version (1.78.0). Rust is also considering adding a similar feature in `rustc` too, which we should probably enable if it becomes available [2]. Nevertheless, enable it. Link: https://github.com/rust-lang/rust-clippy/blob/8dd459d4c750dbf200bbd48a10f129b1401e7bf3/clippy_config/src/msrvs.rs#L19 [1] Link: rust-lang/compiler-team#772 [2] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent f875545 commit 55bae53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.clippy.toml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3+
msrv = "1.78.0"
4+
35
check-private-items = true
46

57
disallowed-macros = [

0 commit comments

Comments
 (0)