diff --git a/ec-gpu-gen/Cargo.toml b/ec-gpu-gen/Cargo.toml index 28a48c1..df7ed7b 100644 --- a/ec-gpu-gen/Cargo.toml +++ b/ec-gpu-gen/Cargo.toml @@ -7,7 +7,7 @@ description = "Code generator for field and eliptic curve operations on the GPUs homepage = "https://github.com/filecoin-project/ff-cl-gen" repository = "https://github.com/filecoin-project/ff-cl-gen" license = "MIT/Apache-2.0" -rust-version = "1.70.0" +rust-version = "1.83.0" [dependencies] bitvec = "1.0.1" diff --git a/ec-gpu-gen/src/multiexp_cpu.rs b/ec-gpu-gen/src/multiexp_cpu.rs index 9ab05d7..dee34c7 100644 --- a/ec-gpu-gen/src/multiexp_cpu.rs +++ b/ec-gpu-gen/src/multiexp_cpu.rs @@ -99,7 +99,7 @@ impl AsRef for FullDensity { } } -impl<'a> QueryDensity for &'a FullDensity { +impl QueryDensity for &FullDensity { type Iter = iter::Repeat; fn iter(self) -> Self::Iter { diff --git a/ec-gpu-gen/src/source.rs b/ec-gpu-gen/src/source.rs index b8515d2..6de5186 100644 --- a/ec-gpu-gen/src/source.rs +++ b/ec-gpu-gen/src/source.rs @@ -323,7 +323,7 @@ impl SourceBuilder { .map(|multiexp| multiexp.source(limb_size)) .collect(); let extra_sources = self.extra_sources.join("\n"); - vec![ + [ COMMON_SRC.to_string(), fields, extension_fields, @@ -599,7 +599,7 @@ fn generate_cuda(source_builder: &SourceBuilder) -> PathBuf { // This is a hack when no properly compiled kernel is needed. That's the case when the // documentation is built on docs.rs and when Clippy is run. We can use arbitrary bytes as // input then. - if env::var("DOCS_RS").is_ok() || cfg!(feature = "cargo-clippy") { + if env::var("DOCS_RS").is_ok() || cfg!(clippy) { println!("cargo:rustc-env=_EC_GPU_CUDA_KERNEL_FATBIN=../build.rs"); return PathBuf::from("../build.rs"); } @@ -630,7 +630,7 @@ fn generate_cuda(source_builder: &SourceBuilder) -> PathBuf { // rebuilt if any of them change. let mut hasher = Sha256::new(); hasher.update(kernel_source.as_bytes()); - hasher.update(&format!("{:?}", &nvcc)); + hasher.update(format!("{:?}", &nvcc)); let kernel_digest = hex::encode(hasher.finalize()); let source_path: PathBuf = [&out_dir, &format!("{}.cu", &kernel_digest)] diff --git a/ec-gpu-gen/src/threadpool.rs b/ec-gpu-gen/src/threadpool.rs index 3445679..459f29e 100644 --- a/ec-gpu-gen/src/threadpool.rs +++ b/ec-gpu-gen/src/threadpool.rs @@ -133,7 +133,7 @@ fn log2_floor(num: usize) -> u32 { } #[cfg(test)] -pub mod tests { +mod tests { use super::*; #[test] diff --git a/rust-toolchain b/rust-toolchain index 832e9af..6b4de0a 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.70.0 +1.83.0