Skip to content

Commit 0517dff

Browse files
committed
rustup: update to nightly-2025-04-13.
1 parent e88f042 commit 0517dff

12 files changed

+42
-37
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-03-29"
21+
channel = "nightly-2025-04-13"
2222
components = ["rust-src", "rustc-dev", "llvm-tools"]
23-
# commit_hash = 920d95eaf23d7eb6b415d09868e4f793024fa604"#;
23+
# commit_hash = 9ffde4b089fe8e43d5891eb517001df27a8443ff"#;
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/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![cfg_attr(doc, recursion_limit = "256")] // FIXME(nnethercote): will be removed by #124141
66
#![feature(assert_matches)]
77
#![feature(box_patterns)]
8-
#![feature(debug_closure_helpers)]
98
#![feature(file_buffered)]
109
#![feature(if_let_guard)]
1110
#![feature(let_chains)]
@@ -413,9 +412,11 @@ impl WriteBackendMethods for SpirvCodegenBackend {
413412
module: ModuleCodegen<Self::Module>,
414413
_config: &ModuleConfig,
415414
) -> Result<CompiledModule, FatalError> {
416-
let path = cgcx
417-
.output_filenames
418-
.temp_path(OutputType::Object, Some(&module.name));
415+
let path = cgcx.output_filenames.temp_path_for_cgu(
416+
OutputType::Object,
417+
&module.name,
418+
cgcx.invocation_temp.as_deref(),
419+
);
419420
// Note: endianness doesn't matter, readers deduce endianness from magic header.
420421
let spirv_module = spirv_tools::binary::from_binary(&module.module_llvm);
421422
File::create(&path)

crates/rustc_codegen_spirv/src/link.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ pub fn link(
6565

6666
if outputs.outputs.should_codegen() {
6767
let out_filename = out_filename(sess, crate_type, outputs, Symbol::intern(crate_name));
68-
let out_filename_file_for_writing =
69-
out_filename.file_for_writing(outputs, OutputType::Exe, None);
68+
let out_filename_file_for_writing = out_filename.file_for_writing(
69+
outputs,
70+
OutputType::Exe,
71+
crate_name,
72+
sess.invocation_temp.as_deref(),
73+
);
7074
match crate_type {
7175
CrateType::Rlib => {
7276
link_rlib(sess, codegen_results, &out_filename_file_for_writing);
@@ -137,7 +141,7 @@ fn link_rlib(sess: &Session, codegen_results: &CodegenResults, out_filename: &Pa
137141

138142
create_archive(
139143
&file_list,
140-
codegen_results.metadata.raw_data(),
144+
codegen_results.metadata.stub_or_full(),
141145
out_filename,
142146
);
143147
}

crates/rustc_codegen_spirv/src/linker/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ pub fn link(
481481
let (spv_words, module_or_err, lower_from_spv_timer) =
482482
spv_module_to_spv_words_and_spirt_module(&output);
483483
let module = &mut module_or_err.map_err(|e| {
484-
let spv_path = outputs.temp_path_ext("spirt-lower-from-spv-input.spv", None);
484+
let spv_path = outputs.temp_path_for_diagnostic("spirt-lower-from-spv-input.spv");
485485

486486
let was_saved_msg =
487487
match std::fs::write(&spv_path, spirv_tools::binary::from_binary(&spv_words)) {
@@ -772,7 +772,7 @@ impl Drop for SpirtDumpGuard<'_> {
772772
self.per_pass_module_for_dumping
773773
.push(("", self.module.clone()));
774774
}
775-
dump_spirt_file_path = Some(self.outputs.temp_path_ext("spirt", None));
775+
dump_spirt_file_path = Some(self.outputs.temp_path_for_diagnostic("spirt"));
776776
}
777777

778778
if let Some(dump_spirt_file_path) = &dump_spirt_file_path {

crates/rustc_codegen_spirv/src/linker/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn link_with_linker_opts(
143143
hash_kind: sopts.unstable_opts.src_hash_algorithm(&target),
144144
checksum_hash_kind: None,
145145
};
146-
rustc_span::create_session_globals_then(sopts.edition, Some(sm_inputs), || {
146+
rustc_span::create_session_globals_then(sopts.edition, &[], Some(sm_inputs), || {
147147
let mut sess = rustc_session::build_session(
148148
sopts,
149149
CompilerIO {

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-03-29"
2+
channel = "nightly-2025-04-13"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = 920d95eaf23d7eb6b415d09868e4f793024fa604
4+
# commit_hash = 9ffde4b089fe8e43d5891eb517001df27a8443ff
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/ptr_copy.normal.stderr

Lines changed: 16 additions & 16 deletions
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:3854:9
2+
--> $CORE_SRC/intrinsics/mod.rs:3805:9
33
|
4-
3854 | copy(src, dst, count)
4+
3805 | copy(src, dst, count)
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: used from within `core::intrinsics::copy::<f32>`
8-
--> $CORE_SRC/intrinsics/mod.rs:3834:21
8+
--> $CORE_SRC/intrinsics/mod.rs:3785:21
99
|
10-
3834 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
10+
3785 | 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:3842:9
31+
--> $CORE_SRC/intrinsics/mod.rs:3793:9
3232
|
33-
3842 | / ub_checks::assert_unsafe_precondition!(
34-
3843 | | check_language_ub,
35-
3844 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
33+
3793 | / ub_checks::assert_unsafe_precondition!(
34+
3794 | | check_language_ub,
35+
3795 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
3636
... |
37-
3852 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
38-
3853 | | );
37+
3803 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
38+
3804 | | );
3939
| |_________^
4040
|
4141
note: used from within `core::intrinsics::copy::<f32>`
42-
--> $CORE_SRC/intrinsics/mod.rs:3842:9
42+
--> $CORE_SRC/intrinsics/mod.rs:3793:9
4343
|
44-
3842 | / ub_checks::assert_unsafe_precondition!(
45-
3843 | | check_language_ub,
46-
3844 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
44+
3793 | / ub_checks::assert_unsafe_precondition!(
45+
3794 | | check_language_ub,
46+
3795 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
4747
... |
48-
3852 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
49-
3853 | | );
48+
3803 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
49+
3804 | | );
5050
| |_________^
5151
note: called by `ptr_copy::copy_via_raw_ptr`
5252
--> $DIR/ptr_copy.rs:28:18

tests/ui/dis/ptr_copy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use spirv_std::spirv;
1111
fn copy_via_raw_ptr(src: &f32, dst: &mut f32) {
1212
#[cfg(via_intrinsic)]
1313
{
14-
extern "rust-intrinsic" {
15-
fn copy<T>(src: *const T, dst: *mut T, count: usize);
16-
}
14+
#[rustc_intrinsic]
15+
unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize);
16+
1717
unsafe { copy(src, dst, 1) }
1818
}
1919

tests/ui/dis/ptr_read.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%4 = OpFunctionParameter %5
33
%6 = OpFunctionParameter %5
44
%7 = OpLabel
5-
OpLine %8 1380 8
5+
OpLine %8 1420 8
66
%9 = OpLoad %10 %4
77
OpLine %11 7 13
88
OpStore %6 %9

tests/ui/dis/ptr_read_method.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%4 = OpFunctionParameter %5
33
%6 = OpFunctionParameter %5
44
%7 = OpLabel
5-
OpLine %8 1380 8
5+
OpLine %8 1420 8
66
%9 = OpLoad %10 %4
77
OpLine %11 7 13
88
OpStore %6 %9

tests/ui/dis/ptr_write.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%7 = OpLabel
55
OpLine %8 7 35
66
%9 = OpLoad %10 %4
7-
OpLine %11 1580 8
7+
OpLine %11 1620 8
88
OpStore %6 %9
99
OpNoLine
1010
OpReturn

tests/ui/dis/ptr_write_method.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%7 = OpLabel
55
OpLine %8 7 37
66
%9 = OpLoad %10 %4
7-
OpLine %11 1580 8
7+
OpLine %11 1620 8
88
OpStore %6 %9
99
OpNoLine
1010
OpReturn

0 commit comments

Comments
 (0)