Skip to content

Commit d123221

Browse files
committed
rustup: update to nightly-2025-06-30.
- `filter_landing_pad` no longer has a return value. - `build_session` no longer has the `sysroot` argument. - `manual_is_multiple_of` clippy lint was enabled.
1 parent dfcff49 commit d123221

File tree

10 files changed

+15
-16
lines changed

10 files changed

+15
-16
lines changed

crates/rustc_codegen_spirv/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ use std::{env, fs, mem};
1818
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
1919
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml");
2020
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
21-
channel = "nightly-2025-06-23"
21+
channel = "nightly-2025-06-30"
2222
components = ["rust-src", "rustc-dev", "llvm-tools"]
23-
# commit_hash = be19eda0dc4c22c5cf5f1b48fd163acf9bd4b0a6"#;
23+
# commit_hash = 35f6036521777bdc0dcea1f980be4c192962a168"#;
2424

2525
fn rustc_output(arg: &str) -> Result<String, Box<dyn Error>> {
2626
let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".into());

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3035,7 +3035,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
30353035
todo!()
30363036
}
30373037

3038-
fn filter_landing_pad(&mut self, _pers_fn: Self::Function) -> (Self::Value, Self::Value) {
3038+
fn filter_landing_pad(&mut self, _pers_fn: Self::Function) {
30393039
todo!()
30403040
}
30413041

crates/rustc_codegen_spirv/src/builder/byte_addressable_buffer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
7474
Some(size) => size,
7575
None => return self.load_err(original_type, result_type),
7676
};
77-
if element_size_bytes.bytes() % 4 != 0 {
77+
if !element_size_bytes.bytes().is_multiple_of(4) {
7878
return self.load_err(original_type, result_type);
7979
}
8080
let element_size_words = (element_size_bytes.bytes() / 4) as u32;
@@ -148,7 +148,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
148148
.iter()
149149
.zip(field_offsets)
150150
.map(|(&field_type, byte_offset)| {
151-
if byte_offset.bytes() % 4 != 0 {
151+
if !byte_offset.bytes().is_multiple_of(4) {
152152
return None;
153153
}
154154
let word_offset = (byte_offset.bytes() / 4) as u32;
@@ -276,7 +276,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
276276
Some(size) => size,
277277
None => return self.store_err(original_type, value),
278278
};
279-
if element_size_bytes.bytes() % 4 != 0 {
279+
if !element_size_bytes.bytes().is_multiple_of(4) {
280280
return self.store_err(original_type, value);
281281
}
282282
let element_size_words = (element_size_bytes.bytes() / 4) as u32;
@@ -343,7 +343,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
343343
..
344344
} => {
345345
for (index, byte_offset) in field_offsets.iter().enumerate() {
346-
if byte_offset.bytes() % 4 != 0 {
346+
if !byte_offset.bytes().is_multiple_of(4) {
347347
return self.store_err(original_type, value);
348348
}
349349
let word_offset = (byte_offset.bytes() / 4) as u32;

crates/rustc_codegen_spirv/src/linker/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ fn link_with_linker_opts(
159159
Default::default(),
160160
Default::default(),
161161
target,
162-
Default::default(),
163162
rustc_interface::util::rustc_version_str().unwrap_or("unknown"),
164163
Default::default(),
165164
&rustc_driver_impl::USING_INTERNAL_FEATURES,

crates/spirv-std/src/byte_addressable_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub struct ByteAddressableBuffer<T> {
7171

7272
fn bounds_check<T>(data: &[u32], byte_index: u32) {
7373
let sizeof = mem::size_of::<T>() as u32;
74-
if byte_index % 4 != 0 {
74+
if !byte_index.is_multiple_of(4) {
7575
panic!("`byte_index` should be a multiple of 4");
7676
}
7777
let last_byte = byte_index + sizeof;

examples/shaders/compute-shader/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn collatz(mut n: u32) -> Option<u32> {
2424
return None;
2525
}
2626
while n != 1 {
27-
n = if n % 2 == 0 {
27+
n = if n.is_multiple_of(2) {
2828
n / 2
2929
} else {
3030
// Overflow? (i.e. 3*n + 1 > 0xffff_ffff)

rust-toolchain.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[toolchain]
2-
channel = "nightly-2025-06-23"
2+
channel = "nightly-2025-06-30"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = be19eda0dc4c22c5cf5f1b48fd163acf9bd4b0a6
4+
# commit_hash = 35f6036521777bdc0dcea1f980be4c192962a168
55

66
# Whenever changing the nightly channel, update the commit hash above, and
77
# change `REQUIRED_RUST_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` too.

tests/difftests/bin/src/runner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ impl Runner {
498498
match output_type {
499499
OutputType::Raw => output1 == output2,
500500
OutputType::F32 => {
501-
if output1.len() % 4 != 0 {
501+
if !output1.len().is_multiple_of(4) {
502502
return false;
503503
}
504504

@@ -527,7 +527,7 @@ impl Runner {
527527
}
528528
}
529529
OutputType::F64 => {
530-
if output1.len() % 8 != 0 {
530+
if !output1.len().is_multiple_of(8) {
531531
return false;
532532
}
533533

tests/difftests/lib/src/scaffold/compute/wgpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ impl ComputeBackend for WgpuBackend {
256256
buffers: Vec<BufferConfig>,
257257
) -> anyhow::Result<Vec<Vec<u8>>> {
258258
// Convert bytes to u32 words
259-
if spirv_bytes.len() % 4 != 0 {
259+
if !spirv_bytes.len().is_multiple_of(4) {
260260
anyhow::bail!("SPIR-V binary length is not a multiple of 4");
261261
}
262262
let spirv_words: Vec<u32> = bytemuck::cast_slice(spirv_bytes).to_vec();

tests/difftests/lib/src/scaffold/shader/rust_gpu_shader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl WgpuShader for RustComputeShader {
7777
) -> anyhow::Result<(wgpu::ShaderModule, Option<String>)> {
7878
let (shader_bytes, entry_point) = self.spirv_bytes()?;
7979

80-
if shader_bytes.len() % 4 != 0 {
80+
if !shader_bytes.len().is_multiple_of(4) {
8181
anyhow::bail!("SPIR-V binary length is not a multiple of 4");
8282
}
8383
let shader_words: Vec<u32> = bytemuck::cast_slice(&shader_bytes).to_vec();

0 commit comments

Comments
 (0)