Skip to content

Commit fcfa371

Browse files
committed
rustup: update to nightly-2024-12-15.
1 parent 8e21493 commit fcfa371

File tree

11 files changed

+28
-20
lines changed

11 files changed

+28
-20
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-2024-12-10"
21+
channel = "nightly-2024-12-15"
2222
components = ["rust-src", "rustc-dev", "llvm-tools"]
23-
# commit_hash = a224f3807e58afc9353510f1d556c607d367545d"#;
23+
# commit_hash = 0aeaa5eb22180fdf12a8489e63c4daa18da6f236"#;
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/codegen_cx/mod.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,20 @@ impl<'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'tcx> {
970970
_template: &[InlineAsmTemplatePiece],
971971
_operands: &[GlobalAsmOperandRef<'tcx>],
972972
_options: InlineAsmOptions,
973-
_line_spans: &[Span],
973+
line_spans: &[Span],
974974
) {
975-
todo!()
975+
self.tcx.dcx().span_fatal(
976+
line_spans.first().copied().unwrap_or_default(),
977+
"[Rust-GPU] `global_asm!` not yet supported",
978+
);
979+
}
980+
981+
// FIXME(eddyb) should this method be implemented as just symbol mangling,
982+
// or renamed upstream into something much more specific?
983+
fn mangled_name(&self, instance: Instance<'tcx>) -> String {
984+
self.tcx.dcx().span_bug(
985+
self.tcx.def_span(instance.def_id()),
986+
"[Rust-GPU] `#[naked] fn` not yet supported",
987+
)
976988
}
977989
}

crates/rustc_codegen_spirv/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl CodegenBackend for SpirvCodegenBackend {
257257
rustc_errors::DEFAULT_LOCALE_RESOURCE
258258
}
259259

260-
fn target_features(&self, sess: &Session, _allow_unstable: bool) -> Vec<Symbol> {
260+
fn target_features_cfg(&self, sess: &Session, _allow_unstable: bool) -> Vec<Symbol> {
261261
let cmdline = sess.opts.cg.target_feature.split(',');
262262
let cfg = sess.target.options.features.split(',');
263263
cfg.chain(cmdline)

crates/rustc_codegen_spirv/src/link.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,10 @@ fn add_upstream_rust_crates(
427427
codegen_results: &CodegenResults,
428428
crate_type: CrateType,
429429
) {
430-
let (_, data) = codegen_results
430+
let data = codegen_results
431431
.crate_info
432432
.dependency_formats
433-
.iter()
434-
.find(|(ty, _)| *ty == crate_type)
433+
.get(&crate_type)
435434
.expect("failed to find crate type in dependency format list");
436435
for &cnum in &codegen_results.crate_info.used_crates {
437436
let src = &codegen_results.crate_info.used_crate_source[&cnum];
@@ -451,11 +450,10 @@ fn add_upstream_native_libraries(
451450
codegen_results: &CodegenResults,
452451
crate_type: CrateType,
453452
) {
454-
let (_, data) = codegen_results
453+
let data = codegen_results
455454
.crate_info
456455
.dependency_formats
457-
.iter()
458-
.find(|(ty, _)| *ty == crate_type)
456+
.get(&crate_type)
459457
.expect("failed to find crate type in dependency format list");
460458

461459
for &cnum in &codegen_results.crate_info.used_crates {

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-2024-12-10"
2+
channel = "nightly-2024-12-15"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = a224f3807e58afc9353510f1d556c607d367545d
4+
# commit_hash = 0aeaa5eb22180fdf12a8489e63c4daa18da6f236
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

Lines changed: 1 addition & 1 deletion
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 1199 4
7+
OpLine %11 1224 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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ error: cannot cast between pointer types
3333
4433 | / ub_checks::assert_unsafe_precondition!(
3434
4434 | | check_language_ub,
3535
4435 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
36-
4436 | | (
3736
... |
3837
4443 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
3938
4444 | | );
@@ -45,7 +44,6 @@ note: used from within `core::intrinsics::copy::<f32>`
4544
4433 | / ub_checks::assert_unsafe_precondition!(
4645
4434 | | check_language_ub,
4746
4435 | | "ptr::copy requires that both pointer arguments are aligned and non-null",
48-
4436 | | (
4947
... |
5048
4443 | | && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size)
5149
4444 | | );

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 1374 8
5+
OpLine %8 1375 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 1374 8
5+
OpLine %8 1375 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 1578 8
7+
OpLine %11 1579 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 1578 8
7+
OpLine %11 1579 8
88
OpStore %6 %9
99
OpNoLine
1010
OpReturn

0 commit comments

Comments
 (0)