Skip to content

Commit 5d1aa0a

Browse files
committed
rustup: update to nightly-2025-04-27.
1 parent cd97c5b commit 5d1aa0a

File tree

7 files changed

+31
-39
lines changed

7 files changed

+31
-39
lines changed

crates/rustc_codegen_spirv/build.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use std::{env, fs, mem};
1515
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
1616
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml");
1717
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
18-
channel = "nightly-2025-04-14"
18+
channel = "nightly-2025-04-27"
1919
components = ["rust-src", "rustc-dev", "llvm-tools"]
20-
# commit_hash = 092a284ba0421695f2032c947765429fd7095796"#;
20+
# commit_hash = 10fa3c449f6b1613b352a6cbf78d3d91fd9a1d81"#;
2121

2222
fn rustc_output(arg: &str) -> Result<String, Box<dyn Error>> {
2323
let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".into());
@@ -317,6 +317,9 @@ mod maybe_pqp_cg_ssa;
317317
// HACK(eddyb) `if cfg!(llvm_enzyme)` added upstream for autodiff support.
318318
println!("cargo::rustc-check-cfg=cfg(llvm_enzyme)");
319319

320+
// HACK(eddyb) `cfg_attr(bootstrap, ...` used upstream temporarily.
321+
println!("cargo::rustc-check-cfg=cfg(bootstrap)");
322+
320323
Ok(())
321324
}
322325

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

+4-14
Original file line numberDiff line numberDiff line change
@@ -210,25 +210,15 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
210210
)),
211211
},
212212
SpirvType::Integer(width, true) => match width {
213-
8 => self
214-
.constant_i8(self.span(), unsafe {
215-
std::mem::transmute::<u8, i8>(fill_byte)
216-
})
217-
.def(self),
213+
8 => self.constant_i8(self.span(), fill_byte as i8).def(self),
218214
16 => self
219-
.constant_i16(self.span(), unsafe {
220-
std::mem::transmute::<u16, i16>(memset_fill_u16(fill_byte))
221-
})
215+
.constant_i16(self.span(), memset_fill_u16(fill_byte) as i16)
222216
.def(self),
223217
32 => self
224-
.constant_i32(self.span(), unsafe {
225-
std::mem::transmute::<u32, i32>(memset_fill_u32(fill_byte))
226-
})
218+
.constant_i32(self.span(), memset_fill_u32(fill_byte) as i32)
227219
.def(self),
228220
64 => self
229-
.constant_i64(self.span(), unsafe {
230-
std::mem::transmute::<u64, i64>(memset_fill_u64(fill_byte))
231-
})
221+
.constant_i64(self.span(), memset_fill_u64(fill_byte) as i64)
232222
.def(self),
233223
_ => self.fatal(format!(
234224
"memset on integer width {width} not implemented yet"

crates/rustc_codegen_spirv/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
#![allow(internal_features)]
33
#![allow(rustc::diagnostic_outside_of_impl)]
44
#![allow(rustc::untranslatable_diagnostic)]
5-
#![cfg_attr(doc, recursion_limit = "256")] // FIXME(nnethercote): will be removed by #124141
5+
#![cfg_attr(bootstrap, feature(let_chains))]
66
#![feature(assert_matches)]
77
#![feature(box_patterns)]
88
#![feature(file_buffered)]
99
#![feature(if_let_guard)]
10-
#![feature(let_chains)]
1110
#![feature(negative_impls)]
1211
#![feature(rustdoc_internals)]
1312
#![feature(string_from_utf8_lossy_owned)]

rust-toolchain.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[toolchain]
2-
channel = "nightly-2025-04-14"
2+
channel = "nightly-2025-04-27"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = 092a284ba0421695f2032c947765429fd7095796
4+
# commit_hash = 10fa3c449f6b1613b352a6cbf78d3d91fd9a1d81
55

66
# Whenever changing the nightly channel, update the commit hash above, and make
77
# sure to change `REQUIRED_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` also.

tests/ui/dis/issue-1062.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ OpLine %5 11 12
44
%6 = OpLoad %7 %8
55
OpLine %5 11 35
66
%9 = OpLoad %7 %10
7-
OpLine %11 1098 4
7+
OpLine %11 1108 4
88
%12 = OpBitwiseAnd %7 %9 %13
99
%14 = OpISub %7 %15 %12
1010
%16 = OpShiftLeftLogical %7 %6 %12

tests/ui/dis/ptr_copy.normal.stderr

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: cannot memcpy dynamically sized data
2-
--> $CORE_SRC/intrinsics/mod.rs:3806:9
2+
--> $CORE_SRC/intrinsics/mod.rs:3851:9
33
|
4-
3806 | copy(src, dst, count)
4+
3851 | copy(src, dst, count)
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: used from within `core::intrinsics::copy::<f32>`
8-
--> $CORE_SRC/intrinsics/mod.rs:3786:21
8+
--> $CORE_SRC/intrinsics/mod.rs:3831:21
99
|
10-
3786 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
10+
3831 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
1111
| ^^^^
1212
note: called by `ptr_copy::copy_via_raw_ptr`
1313
--> $DIR/ptr_copy.rs:28:18
@@ -28,25 +28,25 @@ note: called by `main`
2828
error: cannot cast between pointer types
2929
from `*f32`
3030
to `*struct () { }`
31-
--> $CORE_SRC/intrinsics/mod.rs:3794:9
31+
--> $CORE_SRC/intrinsics/mod.rs:3839:9
3232
|
33-
3794 | / ub_checks::assert_unsafe_precondition!(
34-
3795 | | check_language_ub,
35-
3796 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
33+
3839 | / ub_checks::assert_unsafe_precondition!(
34+
3840 | | check_language_ub,
35+
3841 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
3636
... |
37-
3804 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
38-
3805 | | );
37+
3849 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
38+
3850 | | );
3939
| |_________^
4040
|
4141
note: used from within `core::intrinsics::copy::<f32>`
42-
--> $CORE_SRC/intrinsics/mod.rs:3794:9
42+
--> $CORE_SRC/intrinsics/mod.rs:3839:9
4343
|
44-
3794 | / ub_checks::assert_unsafe_precondition!(
45-
3795 | | check_language_ub,
46-
3796 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
44+
3839 | / ub_checks::assert_unsafe_precondition!(
45+
3840 | | check_language_ub,
46+
3841 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
4747
... |
48-
3804 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
49-
3805 | | );
48+
3849 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
49+
3850 | | );
5050
| |_________^
5151
note: called by `ptr_copy::copy_via_raw_ptr`
5252
--> $DIR/ptr_copy.rs:28:18

tests/ui/lang/core/unwrap_or.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
OpLine %5 13 11
44
%6 = OpCompositeInsert %7 %8 %9 0
55
%10 = OpCompositeExtract %11 %6 1
6-
OpLine %12 999 14
6+
OpLine %12 1024 14
77
%13 = OpBitcast %14 %8
8-
OpLine %12 999 8
8+
OpLine %12 1024 8
99
%15 = OpINotEqual %16 %13 %17
1010
OpNoLine
1111
OpSelectionMerge %18 None

0 commit comments

Comments
 (0)