Skip to content

Commit 2961102

Browse files
committed
rustup: update to nightly-2025-04-27.
1 parent 3104930 commit 2961102

File tree

13 files changed

+31
-46
lines changed

13 files changed

+31
-46
lines changed

.cargo/config.toml

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ rustflags = [
4444
"-Wclippy::map_err_ignore",
4545
"-Wclippy::map_flatten",
4646
"-Wclippy::map_unwrap_or",
47-
"-Wclippy::match_on_vec_items",
4847
"-Wclippy::match_same_arms",
4948
"-Wclippy::match_wild_err_arm",
5049
"-Wclippy::match_wildcard_for_single_variants",

crates/rustc_codegen_spirv/build.rs

+5-2
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-04-14"
21+
channel = "nightly-2025-04-27"
2222
components = ["rust-src", "rustc-dev", "llvm-tools"]
23-
# commit_hash = 092a284ba0421695f2032c947765429fd7095796"#;
23+
# commit_hash = 10fa3c449f6b1613b352a6cbf78d3d91fd9a1d81"#;
2424

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

323+
// HACK(eddyb) `cfg_attr(bootstrap, ...` used upstream temporarily.
324+
println!("cargo::rustc-check-cfg=cfg(bootstrap)");
325+
323326
Ok(())
324327
}
325328

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-3
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)]
@@ -37,7 +36,6 @@
3736
// crate-specific exceptions:
3837
#![allow(
3938
unsafe_code, // rustc_codegen_ssa requires unsafe functions in traits to be impl'd
40-
clippy::match_on_vec_items, // rustc_codegen_spirv has less strict panic requirements than other embark projects
4139
clippy::enum_glob_use, // pretty useful pattern with some codegen'd enums (e.g. rspirv::spirv::Op)
4240
clippy::todo, // still lots to implement :)
4341

crates/spirv-builder/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
clippy::map_err_ignore,
3737
clippy::map_flatten,
3838
clippy::map_unwrap_or,
39-
clippy::match_on_vec_items,
4039
clippy::match_same_arms,
4140
clippy::match_wildcard_for_single_variants,
4241
clippy::mem_forget,

crates/spirv-std/macros/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
clippy::map_err_ignore,
3737
clippy::map_flatten,
3838
clippy::map_unwrap_or,
39-
clippy::match_on_vec_items,
4039
clippy::match_same_arms,
4140
clippy::match_wildcard_for_single_variants,
4241
clippy::mem_forget,

crates/spirv-std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
clippy::map_err_ignore,
4343
clippy::map_flatten,
4444
clippy::map_unwrap_or,
45-
clippy::match_on_vec_items,
4645
clippy::match_same_arms,
4746
clippy::match_wildcard_for_single_variants,
4847
clippy::mem_forget,

examples/runners/ash/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
clippy::map_err_ignore,
3737
clippy::map_flatten,
3838
clippy::map_unwrap_or,
39-
clippy::match_on_vec_items,
4039
clippy::match_same_arms,
4140
clippy::match_wildcard_for_single_variants,
4241
clippy::mem_forget,

examples/runners/cpu/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
clippy::map_err_ignore,
3737
clippy::map_flatten,
3838
clippy::map_unwrap_or,
39-
clippy::match_on_vec_items,
4039
clippy::match_same_arms,
4140
clippy::match_wildcard_for_single_variants,
4241
clippy::mem_forget,

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)