Skip to content

Commit c722bda

Browse files
nnethercoteLegNeato
authored andcommitted
rustup: update to nightly-2025-06-30.
- `filter_landing_pad` no longer has a return value. - `manual_is_multiple_of` clippy lint was enabled.
1 parent 51eca39 commit c722bda

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,16 @@ impl<A: DeviceCopy + Pod> DeviceBuffer<A> {
320320
/// - If either type is a ZST (but not both).
321321
#[cfg_attr(docsrs, doc(cfg(feature = "bytemuck")))]
322322
pub fn try_cast<B: Pod + DeviceCopy>(self) -> Result<DeviceBuffer<B>, PodCastError> {
323-
if align_of::<B>() > align_of::<A>() && (self.buf.as_raw() as usize) % align_of::<B>() != 0
323+
if align_of::<B>() > align_of::<A>()
324+
&& !(self.buf.as_raw() as usize).is_multiple_of(align_of::<B>())
324325
{
325326
Err(PodCastError::TargetAlignmentGreaterAndInputNotAligned)
326327
} else if size_of::<B>() == size_of::<A>() {
327328
// SAFETY: we made sure sizes were compatible, and DeviceBuffer is repr(C)
328329
Ok(unsafe { transmute::<DeviceBuffer<A>, DeviceBuffer<B>>(self) })
329330
} else if size_of::<A>() == 0 || size_of::<B>() == 0 {
330331
Err(PodCastError::SizeMismatch)
331-
} else if (size_of::<A>() * self.len) % size_of::<B>() == 0 {
332+
} else if (size_of::<A>() * self.len).is_multiple_of(size_of::<B>()) {
332333
let new_len = (size_of::<A>() * self.len) / size_of::<B>();
333334
let ret = Ok(DeviceBuffer {
334335
buf: self.buf.cast(),

crates/rustc_codegen_nvvm/src/abi.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,12 @@ impl LlvmType for CastTarget {
207207
"total size {:?} cannot be divided into units of zero size",
208208
self.rest.total
209209
);
210-
if self.rest.total.bytes() % self.rest.unit.size.bytes() != 0 {
210+
if !self
211+
.rest
212+
.total
213+
.bytes()
214+
.is_multiple_of(self.rest.unit.size.bytes())
215+
{
211216
assert_eq!(
212217
self.rest.unit.kind,
213218
RegKind::Integer,

crates/rustc_codegen_nvvm/src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ impl<'ll, 'tcx, 'a> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
10561056
todo!()
10571057
}
10581058

1059-
fn filter_landing_pad(&mut self, _pers_fn: &'ll Value) -> (&'ll Value, &'ll Value) {
1059+
fn filter_landing_pad(&mut self, _pers_fn: &'ll Value) {
10601060
todo!()
10611061
}
10621062

crates/rustc_codegen_nvvm/src/int_replace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub(crate) fn get_transformed_type<'ll>(
7777
// going from i64 down.
7878
pub(crate) fn target_vector_width_and_count(int_width: u32) -> (u32, u32) {
7979
for &i in WIDTH_CANDIDATES {
80-
if int_width % i == 0 {
80+
if int_width.is_multiple_of(i) {
8181
return (i, int_width / i);
8282
}
8383
}

rust-toolchain.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2025-06-23"
3-
components = ["clippy", "llvm-tools-preview", "rust-src", "rustc-dev", "rustfmt", "rust-analyzer"]
2+
channel = "nightly-2025-06-30"
3+
components = ["clippy", "llvm-tools-preview", "rust-src", "rustc-dev", "rustfmt", "rust-analyzer"]

0 commit comments

Comments
 (0)