diff --git a/.gitlab-ci/container/build-rust.sh b/.gitlab-ci/container/build-rust.sh index f0af7c1f39f..7d7856011fa 100644 --- a/.gitlab-ci/container/build-rust.sh +++ b/.gitlab-ci/container/build-rust.sh @@ -15,7 +15,8 @@ section_start rust "Building Rust toolchain" # This version number should match what we require in meson.build so we catch # build issues from patches relying on new features in newer Rust versions. # Keep this is sync with the `rustc.version()` check in meson.build, and with -# the `rustup default` line in .gitlab-ci/meson/build.sh +# the `rustup default` line in .gitlab-ci/meson/build.sh and the `msrv` in +# clippy.toml MINIMUM_SUPPORTED_RUST_VERSION=1.82.0 # This version number can be bumped freely, to benefit from the latest diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh index d61ba053298..0746d0e72b9 100755 --- a/.gitlab-ci/meson/build.sh +++ b/.gitlab-ci/meson/build.sh @@ -44,7 +44,8 @@ fi # Android manages the rust toolchain differently, ignore that case if [ "$CI_JOB_STAGE" = "build-for-tests" ] && [[ "$CI_JOB_NAME" != *android* ]]; then # Keep this in sync with the `rustc.version()` check in meson.build, and - # MINIMUM_SUPPORTED_RUST_VERSION in .gitlab-ci/container/build-rust.sh + # MINIMUM_SUPPORTED_RUST_VERSION in .gitlab-ci/container/build-rust.sh and the + # `msrv` in clippy.toml rustup default 1.82.0 fi diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000000..949a41a450d --- /dev/null +++ b/clippy.toml @@ -0,0 +1,4 @@ +# Keep this in sync with the `rustc.version()` check in meson.build, the +# MINIMUM_SUPPORTED_RUST_VERSION in .gitlab-ci/container/build-rust.sh, the +# `rustup default` line in .gitlab-ci/meson/build.sh +msrv = "1.82.0" diff --git a/meson.build b/meson.build index ef0e5b0ddd6..63370e97d8c 100644 --- a/meson.build +++ b/meson.build @@ -790,7 +790,7 @@ if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') or # Keep this in sync with the MINIMUM_SUPPORTED_RUST_VERSION in # .gitlab-ci/container/build-rust.sh and the `rustup default` line in - # .gitlab-ci/meson/build.sh + # .gitlab-ci/meson/build.sh and the `msrv` in clippy.toml if rustc.version().version_compare('< 1.82') error('Mesa requires Rust 1.82.0 or newer') endif