1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 07:53:11 -05:00
No description
Find a file
Miguel Ojeda f0915acd1f rust: give Clippy the minimum supported Rust version
Clippy's lints may avoid emitting a suggestion to use a language or
library feature that is not supported by the minimum supported version,
if given by the `msrv` field in the configuration file.

For instance, Clippy should not suggest using `let ... else` in a lint
if the MSRV did not implement that syntax.

If the MSRV is not provided, Clippy will assume all features are available.

Thus enable it with the minimum Rust version the kernel supports.

Note that there is currently a small disadvantage in doing so: since
we still use unstable features that nevertheless work in the range
of versions we support (e.g. `#[expect(...)]`), we lose suggestions
for those. However, over time we will stop using unstable features
(especially language and library ones) as it is our goal, thus, in the
end, we will want to have the `msrv` set.

Rust is also considering adding a similar feature in `rustc` too, which
we should probably enable if it becomes available [2].

Link: 8298da72e7/clippy_utils/src/msrvs.rs (L20) [1]
Link: https://github.com/rust-lang/compiler-team/issues/772 [2]
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20241123222345.346976-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-01-10 00:17:25 +01:00
arch
block
certs
crypto
Documentation
drivers rust: finish using custom FFI integer types 2024-12-16 21:48:45 +01:00
fs
include
init rust: document bindgen 0.71.0 regression 2025-01-10 00:17:00 +01:00
io_uring
ipc
kernel
lib
LICENSES
mm
net
rust rust: block: fix formatting in GenDisk doc 2024-12-18 16:21:01 +01:00
samples rust: finish using custom FFI integer types 2024-12-16 21:48:45 +01:00
scripts rust: document bindgen 0.71.0 regression 2025-01-10 00:17:00 +01:00
security
sound
tools
usr
virt
.clang-format
.clippy.toml rust: give Clippy the minimum supported Rust version 2025-01-10 00:17:25 +01:00
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.