Skip to content

Commit a3d3ab9

Browse files
committed
rustup: update to nightly-2023-11-26.
1 parent e0d9071 commit a3d3ab9

30 files changed

+136
-128
lines changed

crates/rustc_codegen_spirv/build.rs

Lines changed: 2 additions & 2 deletions
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-2023-09-30"
13+
channel = "nightly-2023-11-26"
1414
components = ["rust-src", "rustc-dev", "llvm-tools"]
15-
# commit_hash = 8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72"#;
15+
# commit_hash = f5dc2653fdd8b5d177b2ccbd84057954340a89fc"#;
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/abi.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_middle::query::Providers;
1212
use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
1313
use rustc_middle::ty::GenericArgsRef;
1414
use rustc_middle::ty::{
15-
self, Const, FloatTy, GeneratorArgs, IntTy, ParamEnv, PolyFnSig, Ty, TyCtxt, TyKind,
15+
self, Const, CoroutineArgs, FloatTy, IntTy, ParamEnv, PolyFnSig, Ty, TyCtxt, TyKind,
1616
TypeAndMut, UintTy,
1717
};
1818
use rustc_middle::{bug, span_bug};
@@ -64,6 +64,9 @@ pub(crate) fn provide(providers: &mut Providers) {
6464
) -> &'tcx FnAbi<'tcx, Ty<'tcx>> {
6565
let readjust_arg_abi = |arg: &ArgAbi<'tcx, Ty<'tcx>>| {
6666
let mut arg = ArgAbi::new(&tcx, arg.layout, |_, _, _| ArgAttributes::new());
67+
// FIXME: this is bad! https://github.com/rust-lang/rust/issues/115666
68+
// <https://github.com/rust-lang/rust/commit/eaaa03faf77b157907894a4207d8378ecaec7b45>
69+
arg.make_direct_deprecated();
6770

6871
// Avoid pointlessly passing ZSTs, just like the official Rust ABI.
6972
if arg.layout.is_zst() {
@@ -96,7 +99,9 @@ pub(crate) fn provide(providers: &mut Providers) {
9699

97100
// FIXME(eddyb) remove this by deriving `Clone` for `LayoutS` upstream.
98101
// FIXME(eddyb) the `S` suffix is a naming antipattern, rename upstream.
99-
fn clone_layout(layout: &LayoutS) -> LayoutS {
102+
fn clone_layout<FieldIdx: Idx, VariantIdx: Idx>(
103+
layout: &LayoutS<FieldIdx, VariantIdx>,
104+
) -> LayoutS<FieldIdx, VariantIdx> {
100105
let LayoutS {
101106
ref fields,
102107
ref variants,
@@ -744,7 +749,7 @@ fn trans_struct<'tcx>(cx: &CodegenCx<'tcx>, span: Span, ty: TyAndLayout<'tcx>) -
744749
fn def_id_for_spirv_type_adt(layout: TyAndLayout<'_>) -> Option<DefId> {
745750
match *layout.ty.kind() {
746751
TyKind::Adt(def, _) => Some(def.did()),
747-
TyKind::Foreign(def_id) | TyKind::Closure(def_id, _) | TyKind::Generator(def_id, ..) => {
752+
TyKind::Foreign(def_id) | TyKind::Closure(def_id, _) | TyKind::Coroutine(def_id, ..) => {
748753
Some(def_id)
749754
}
750755
_ => None,
@@ -779,8 +784,8 @@ impl fmt::Display for TyLayoutNameKey<'_> {
779784
write!(f, "::{}", def.variants()[index].name)?;
780785
}
781786
}
782-
if let (TyKind::Generator(_, _, _), Some(index)) = (self.ty.kind(), self.variant) {
783-
write!(f, "::{}", GeneratorArgs::variant_name(index))?;
787+
if let (TyKind::Coroutine(_, _, _), Some(index)) = (self.ty.kind(), self.variant) {
788+
write!(f, "::{}", CoroutineArgs::variant_name(index))?;
784789
}
785790
Ok(())
786791
}

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
30373037
self.intcast(val, dest_ty, false)
30383038
}
30393039

3040-
fn do_not_inline(&mut self, _llret: Self::Value) {
3040+
fn apply_attrs_to_cleanup_callsite(&mut self, _llret: Self::Value) {
30413041
// Ignore
30423042
}
30433043
}

crates/rustc_codegen_spirv/src/builder/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use rustc_codegen_ssa::traits::{BuilderMethods, IntrinsicCallMethods};
1212
use rustc_middle::bug;
1313
use rustc_middle::ty::layout::LayoutOf;
1414
use rustc_middle::ty::{FnDef, Instance, ParamEnv, Ty, TyKind};
15-
use rustc_span::source_map::Span;
1615
use rustc_span::sym;
16+
use rustc_span::Span;
1717
use rustc_target::abi::call::{FnAbi, PassMode};
1818
use std::assert_matches::assert_matches;
1919

crates/rustc_codegen_spirv/src/builder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use rustc_middle::ty::layout::{
2929
};
3030
use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt};
3131
use rustc_span::def_id::DefId;
32-
use rustc_span::source_map::Span;
32+
use rustc_span::Span;
3333
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
3434
use rustc_target::abi::{HasDataLayout, Size, TargetDataLayout};
3535
use rustc_target::spec::{HasTargetSpec, Target};

crates/rustc_codegen_spirv/src/builder_spirv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ impl<'tcx> BuilderSpirv<'tcx> {
767767
FileName::Real(name) => {
768768
name.to_string_lossy(FileNameDisplayPreference::Remapped)
769769
}
770-
_ => sf.name.prefer_remapped().to_string().into(),
770+
_ => sf.name.prefer_remapped_unconditionaly().to_string().into(),
771771
};
772772
let file_name = {
773773
// FIXME(eddyb) it should be possible to arena-allocate a

crates/rustc_codegen_spirv/src/codegen_cx/type_.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ use rustc_middle::ty::layout::{
99
};
1010
use rustc_middle::ty::Ty;
1111
use rustc_middle::{bug, span_bug};
12-
use rustc_span::source_map::{Span, Spanned, DUMMY_SP};
12+
use rustc_span::source_map::Spanned;
13+
use rustc_span::{Span, DUMMY_SP};
1314
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
1415
use rustc_target::abi::{Abi, AddressSpace, FieldsShape};
1516

crates/rustc_codegen_spirv/src/linker/dce.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ fn instruction_is_pure(inst: &Instruction) -> bool {
281281
| PtrEqual
282282
| PtrNotEqual
283283
| PtrDiff => true,
284-
Variable => inst.operands.get(0) == Some(&Operand::StorageClass(StorageClass::Function)),
284+
Variable => inst.operands.first() == Some(&Operand::StorageClass(StorageClass::Function)),
285285
_ => false,
286286
}
287287
}

crates/rustc_codegen_spirv/src/linker/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ fn link_with_linker_opts(
155155
rustc_interface::util::rustc_version_str().unwrap_or("unknown"),
156156
Default::default(),
157157
Default::default(),
158+
Default::default(),
158159
);
159160

160161
// HACK(eddyb) inject `write_diags` into `sess`, to work around

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-2023-09-30"
2+
channel = "nightly-2023-11-26"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = 8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72
4+
# commit_hash = f5dc2653fdd8b5d177b2ccbd84057954340a89fc
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)