Skip to content

Commit 77dee14

Browse files
committed
Update Rust toolchain to nightly-2025-06-23
1 parent 61bb7a5 commit 77dee14

File tree

32 files changed

+281
-278
lines changed

32 files changed

+281
-278
lines changed

crates/cust/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl fmt::Display for CudaError {
105105
.to_result()
106106
.map_err(|_| fmt::Error)?;
107107
let cstr = CStr::from_ptr(ptr);
108-
write!(f, "{:?}", cstr)
108+
write!(f, "{cstr:?}")
109109
}
110110
}
111111
// This shouldn't happen

crates/cust/src/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ unsafe impl Send for Function<'_> {}
213213
unsafe impl Sync for Function<'_> {}
214214

215215
impl Function<'_> {
216-
pub(crate) fn new(inner: CUfunction, _module: &Module) -> Function {
216+
pub(crate) fn new(inner: CUfunction, _module: &Module) -> Function<'_> {
217217
Function {
218218
inner,
219219
module: PhantomData,

crates/cust/src/memory/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl ArrayFormat {
139139
// there are literally no docs on what nv12 is???
140140
// it seems to be something with multiplanar arrays, needs some investigation
141141
CUarray_format_enum::CU_AD_FORMAT_NV12 => panic!("nv12 is not supported yet"),
142-
_ => panic!("Unsupported array format: {:?}", raw),
142+
_ => panic!("Unsupported array format: {raw:?}"),
143143
}
144144
}
145145

crates/cust/src/memory/device/device_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ impl<T: DeviceCopy + Zeroable> DeviceBuffer<T> {
288288

289289
#[cfg(feature = "bytemuck")]
290290
fn casting_went_wrong(src: &str, err: PodCastError) -> ! {
291-
panic!("{}>{:?}", src, err);
291+
panic!("{src}>{err:?}");
292292
}
293293

294294
#[cfg(feature = "bytemuck")]

crates/cust/src/memory/device/device_slice.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -445,27 +445,21 @@ pub trait DeviceSliceIndex<T: DeviceCopy> {
445445
#[cold]
446446
#[track_caller]
447447
fn slice_start_index_len_fail(index: usize, len: usize) -> ! {
448-
panic!(
449-
"range start index {} out of range for slice of length {}",
450-
index, len
451-
);
448+
panic!("range start index {index} out of range for slice of length {len}");
452449
}
453450

454451
#[inline(never)]
455452
#[cold]
456453
#[track_caller]
457454
fn slice_end_index_len_fail(index: usize, len: usize) -> ! {
458-
panic!(
459-
"range end index {} out of range for slice of length {}",
460-
index, len
461-
);
455+
panic!("range end index {index} out of range for slice of length {len}");
462456
}
463457

464458
#[inline(never)]
465459
#[cold]
466460
#[track_caller]
467461
fn slice_index_order_fail(index: usize, end: usize) -> ! {
468-
panic!("slice index starts at {} but ends at {}", index, end);
462+
panic!("slice index starts at {index} but ends at {end}");
469463
}
470464

471465
#[inline(never)]

crates/cust_raw/build/callbacks.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ impl ParseCallbacks for BindgenCallbacks {
4242
match doxygen_bindgen::transform(&cleaned) {
4343
Ok(res) => Some(res),
4444
Err(err) => {
45-
println!(
46-
"cargo:warning=Problem processing doxygen comment: {}\n{}",
47-
comment, err
48-
);
45+
println!("cargo:warning=Problem processing doxygen comment: {comment}\n{err}");
4946
None
5047
}
5148
}
@@ -184,7 +181,7 @@ impl FunctionRenames {
184181

185182
let expanded = match build.try_expand() {
186183
Ok(expanded) => expanded,
187-
Err(e) => panic!("Failed to expand macros: {}", e),
184+
Err(e) => panic!("Failed to expand macros: {e}"),
188185
};
189186
let expanded = str::from_utf8(&expanded).unwrap();
190187

crates/cust_raw/build/cuda_sdk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl CudaSdk {
164164
cuda_root: &path::Path,
165165
) -> Result<Vec<path::PathBuf>, Box<dyn error::Error>> {
166166
let (target, triple) = Self::parse_target_triple()?;
167-
assert!(triple.len() >= 3, "Invalid target triple: {:?}", triple);
167+
assert!(triple.len() >= 3, "Invalid target triple: {triple:?}");
168168

169169
let search_dirs = match [triple[0].as_str(), triple[1].as_str(), triple[2].as_str()] {
170170
["x86_64", "pc", "windows"] => {
@@ -248,7 +248,7 @@ impl CudaSdk {
248248
.ok_or("Cannot find CUDA_VERSION from CUDA header file.")?;
249249
let version = version
250250
.parse::<u32>()
251-
.map_err(|_| format!("Cannot parse CUDA_VERSION as u32: '{}'", version))?;
251+
.map_err(|_| format!("Cannot parse CUDA_VERSION as u32: '{version}'"))?;
252252
Ok(version)
253253
}
254254

@@ -264,7 +264,7 @@ impl CudaSdk {
264264
.ok_or("Cannot find CUDART_VERSION from cuda_runtime header file.")?;
265265
let version = version
266266
.parse::<u32>()
267-
.map_err(|_| format!("Cannot parse CUDART_VERSION as u32: '{}'", version))?;
267+
.map_err(|_| format!("Cannot parse CUDART_VERSION as u32: '{version}'"))?;
268268
Ok(version)
269269
}
270270

crates/cust_raw/build/main.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ fn main() {
5959
let metadata_nvvm_include = env::join_paths(sdk.nvvm_include_paths())
6060
.map(|s| s.to_string_lossy().to_string())
6161
.expect("Failed to build metadata for nvvm_include.");
62-
println!("cargo::metadata=includes={}", metadata_cuda_include);
63-
println!("cargo::metadata=nvvm_includes={}", metadata_nvvm_include);
62+
println!("cargo::metadata=includes={metadata_cuda_include}");
63+
println!("cargo::metadata=nvvm_includes={metadata_nvvm_include}");
6464
// Re-run build script conditions.
6565
println!("cargo::rerun-if-changed=build");
6666
for e in sdk.related_cuda_envs() {
67-
println!("cargo::rerun-if-env-changed={}", e);
67+
println!("cargo::rerun-if-env-changed={e}");
6868
}
6969

7070
create_cuda_driver_bindings(&sdk, &outdir, &manifest_dir);
@@ -138,6 +138,12 @@ fn create_cuda_driver_bindings(
138138
.allowlist_type("^cuda.*")
139139
.allowlist_var("^CU.*")
140140
.allowlist_function("^cu.*")
141+
.no_partialeq("CUDA_HOST_NODE_PARAMS.*")
142+
.no_partialeq("CUDA_KERNEL_NODE_PARAMS.*")
143+
.no_hash("CUDA_HOST_NODE_PARAMS.*")
144+
.no_hash("CUDA_KERNEL_NODE_PARAMS.*")
145+
.no_copy("CUDA_HOST_NODE_PARAMS.*")
146+
.no_copy("CUDA_KERNEL_NODE_PARAMS.*")
141147
.default_enum_style(bindgen::EnumVariation::Rust {
142148
non_exhaustive: false,
143149
})

crates/cust_raw/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
#[cfg(feature = "driver")]
2+
#[allow(clippy::missing_safety_doc)]
23
pub mod driver_sys;
34
#[cfg(feature = "runtime")]
5+
#[allow(clippy::missing_safety_doc)]
46
pub mod runtime_sys;
57

68
#[cfg(feature = "cublas")]
9+
#[allow(clippy::missing_safety_doc)]
710
pub mod cublas_sys;
811
#[cfg(feature = "cublaslt")]
12+
#[allow(clippy::missing_safety_doc)]
913
pub mod cublaslt_sys;
1014
#[cfg(feature = "cublasxt")]
15+
#[allow(clippy::missing_safety_doc)]
1116
pub mod cublasxt_sys;
1217

1318
#[cfg(feature = "nvptx-compiler")]
19+
#[allow(clippy::missing_safety_doc)]
1420
pub mod nvptx_compiler_sys;
1521
#[cfg(feature = "nvvm")]
22+
#[allow(clippy::missing_safety_doc)]
1623
pub mod nvvm_sys;

crates/gpu_rand/src/xoroshiro/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ pub struct Seed512(pub [u8; 64]);
305305

306306
impl Seed512 {
307307
/// Return an iterator over the seed.
308-
pub fn iter(&self) -> core::slice::Iter<u8> {
308+
pub fn iter(&self) -> core::slice::Iter<'_, u8> {
309309
self.0.iter()
310310
}
311311
}

0 commit comments

Comments
 (0)