Skip to content

Commit e422b7a

Browse files
eddybLegNeato
authored andcommitted
rustup: update to nightly-2024-01-06.
1 parent d1bad2a commit e422b7a

File tree

8 files changed

+23
-12
lines changed

8 files changed

+23
-12
lines changed

crates/rustc_codegen_spirv/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use std::process::{Command, ExitCode};
1010
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
1111
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml");
1212
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
13-
channel = "nightly-2024-01-05"
13+
channel = "nightly-2024-01-06"
1414
components = ["rust-src", "rustc-dev", "llvm-tools"]
15-
# commit_hash = f688dd684faca5b31b156fac2c6e0ae81fc9bc90"#;
15+
# commit_hash = 595bc6f00369475047538fdae1ff8cea692ac385"#;
1616

1717
fn get_rustc_commit_hash() -> Result<String, Box<dyn Error>> {
1818
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc"));

crates/rustc_codegen_spirv/src/builder/intrinsics.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ impl<'a, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'tcx> {
105105
let ptr = args[0].immediate();
106106
let layout = self.layout_of(fn_args.type_at(0));
107107
let load = self.volatile_load(layout.spirv_type(self.span(), self), ptr);
108-
self.to_immediate(load, layout)
108+
if !result.layout.is_zst() {
109+
self.store(load, result.llval, result.align);
110+
}
111+
return;
109112
}
110113

111114
sym::prefetch_read_data

crates/rustc_codegen_spirv/src/builder/mod.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::builder_spirv::{BuilderCursor, SpirvValue, SpirvValueExt};
1414
use crate::codegen_cx::CodegenCx;
1515
use crate::spirv_type::SpirvType;
1616
use rspirv::spirv::{self, Word};
17-
use rustc_codegen_ssa::mir::operand::OperandValue;
17+
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
1818
use rustc_codegen_ssa::mir::place::PlaceRef;
1919
use rustc_codegen_ssa::traits::{
2020
AbiBuilderMethods, ArgAbiMethods, BackendTypes, BuilderMethods, CoverageInfoBuilderMethods,
@@ -301,7 +301,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
301301
match arg_abi.mode {
302302
PassMode::Ignore => {}
303303
PassMode::Direct(_) => {
304-
OperandValue::Immediate(next(self, idx)).store(self, dst);
304+
self.store_arg(arg_abi, next(self, idx), dst);
305305
}
306306
PassMode::Pair(..) => {
307307
OperandValue::Pair(next(self, idx), next(self, idx)).store(self, dst);
@@ -323,7 +323,9 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
323323
match arg_abi.mode {
324324
PassMode::Ignore => {}
325325
PassMode::Direct(_) | PassMode::Pair(..) => {
326-
OperandValue::Immediate(val).store(self, dst);
326+
OperandRef::from_immediate_or_packed_pair(self, val, arg_abi.layout)
327+
.val
328+
.store(self, dst);
327329
}
328330
PassMode::Cast { .. } | PassMode::Indirect { .. } => span_bug!(
329331
self.span(),

crates/rustc_codegen_spirv/src/custom_decorations.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ impl<'a> CustomDecoration<'a> for SrcLocDecoration<'a> {
158158
}
159159
fn decode(s: &'a str) -> Self {
160160
#[derive(Copy, Clone, Debug)]
161-
struct InvalidSrcLoc<'a>(&'a str);
161+
struct InvalidSrcLoc<'a>(
162+
// HACK(eddyb) only exists for `fmt::Debug` in case of error.
163+
#[allow(dead_code)] &'a str,
164+
);
162165
let err = InvalidSrcLoc(s);
163166

164167
let (s, col_end) = s.rsplit_once(':').ok_or(err).unwrap();

crates/rustc_codegen_spirv/src/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ fn do_spirv_opt(
350350
// <https://github.com/rust-lang/rust/commit/2cd14bc9394ca6675e08d02c02c5f9abfa813616>
351351
Level::Error | Level::Fatal | Level::InternalError => DiagnosticBuilder::<()>::new(
352352
sess.dcx(),
353-
rustc_errors::Level::Error { lint: false },
353+
rustc_errors::Level::Error,
354354
msg.message,
355355
),
356356
Level::Warning => sess.dcx().struct_warn(msg.message),

crates/rustc_codegen_spirv/src/linker/specializer.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ enum CopyOperand {
234234
}
235235

236236
#[derive(Debug)]
237-
struct NotSupportedAsCopyOperand(Operand);
237+
struct NotSupportedAsCopyOperand(
238+
// HACK(eddyb) only exists for `fmt::Debug` in case of error.
239+
#[allow(dead_code)] Operand,
240+
);
238241

239242
impl TryFrom<&Operand> for CopyOperand {
240243
type Error = NotSupportedAsCopyOperand;

crates/rustc_codegen_spirv/src/linker/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fn link_with_linker_opts(
169169
)
170170
};
171171
let emitter =
172-
rustc_errors::emitter::EmitterWriter::new(Box::new(buf), fallback_bundle)
172+
rustc_errors::emitter::HumanEmitter::new(Box::new(buf), fallback_bundle)
173173
.sm(Some(sess.parse_sess.clone_source_map()));
174174

175175
rustc_errors::DiagCtxt::with_emitter(Box::new(emitter))

rust-toolchain.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[toolchain]
2-
channel = "nightly-2024-01-05"
2+
channel = "nightly-2024-01-06"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = f688dd684faca5b31b156fac2c6e0ae81fc9bc90
4+
# commit_hash = 595bc6f00369475047538fdae1ff8cea692ac385
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.

0 commit comments

Comments
 (0)