From 3d1912f1303810459eafb7c251822db2aaf53df9 Mon Sep 17 00:00:00 2001 From: Arthur Meyre Date: Mon, 19 Aug 2024 17:25:51 +0200 Subject: [PATCH] chore(ci): update tfhe-lints to more recent toolchain --- utils/cargo-tfhe-lints-inner/Cargo.toml | 2 +- utils/cargo-tfhe-lints-inner/rust-toolchain.toml | 2 +- .../src/serialize_without_versionize.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/utils/cargo-tfhe-lints-inner/Cargo.toml b/utils/cargo-tfhe-lints-inner/Cargo.toml index 400d708b19..80447dea8f 100644 --- a/utils/cargo-tfhe-lints-inner/Cargo.toml +++ b/utils/cargo-tfhe-lints-inner/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -rustc-tools = "0.78" +rustc-tools = "0.80" [package.metadata.rust-analyzer] rustc_private=true diff --git a/utils/cargo-tfhe-lints-inner/rust-toolchain.toml b/utils/cargo-tfhe-lints-inner/rust-toolchain.toml index a6a6e0cf31..9e0f505df3 100644 --- a/utils/cargo-tfhe-lints-inner/rust-toolchain.toml +++ b/utils/cargo-tfhe-lints-inner/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2024-05-02" +channel = "nightly-2024-07-25" components = ["rustc-dev", "rust-src", "llvm-tools-preview"] profile = "minimal" diff --git a/utils/cargo-tfhe-lints-inner/src/serialize_without_versionize.rs b/utils/cargo-tfhe-lints-inner/src/serialize_without_versionize.rs index 3ccec6fc13..ac60db53fb 100644 --- a/utils/cargo-tfhe-lints-inner/src/serialize_without_versionize.rs +++ b/utils/cargo-tfhe-lints-inner/src/serialize_without_versionize.rs @@ -101,9 +101,8 @@ impl<'tcx> LateLintPass<'tcx> for SerializeWithoutVersionize { cx.span_lint( SERIALIZE_WITHOUT_VERSIONIZE, cx.tcx.def_span(type_def_id), - format!( - "Type {ty} implements `Serialize` but does not implement `Versionize`" - ),|diag| { + |diag| { + diag.primary_message("Type {ty} implements `Serialize` but does not implement `Versionize`"); diag.note("Add `#[derive(Versionize)] for this type or silence this warning using \ `#[cfg_attr(tfhe_lints, allow(tfhe_lints::serialize_without_versionize))]``"); diag.span_note(item.span, "`Serialize` derived here");