From 36c94edd3600cd4af4257a1a77fd7ca12cbb8d94 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Mon, 27 Nov 2023 00:17:18 -0400 Subject: [PATCH] rustup: update to nightly-2023-11-26. --- CHANGELOG.md | 1 + crates/rustc_codegen_spirv/build.rs | 4 ++-- crates/rustc_codegen_spirv/src/abi.rs | 13 ++++++++----- .../src/builder/builder_methods.rs | 2 +- .../rustc_codegen_spirv/src/builder/intrinsics.rs | 2 +- crates/rustc_codegen_spirv/src/builder/mod.rs | 2 +- crates/rustc_codegen_spirv/src/builder_spirv.rs | 2 +- crates/rustc_codegen_spirv/src/codegen_cx/type_.rs | 3 ++- rust-toolchain.toml | 4 ++-- 9 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e144609a24..8911e67d96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed 🛠 +- [PR#1102](https://github.com/EmbarkStudios/rust-gpu/pull/1100) updated toolchain to `nightly-2023-11-26` - [PR#1100](https://github.com/EmbarkStudios/rust-gpu/pull/1100) updated toolchain to `nightly-2023-09-30` - [PR#1091](https://github.com/EmbarkStudios/rust-gpu/pull/1091) updated toolchain to `nightly-2023-08-29` - [PR#1085](https://github.com/EmbarkStudios/rust-gpu/pull/1085) updated toolchain to `nightly-2023-07-08` diff --git a/crates/rustc_codegen_spirv/build.rs b/crates/rustc_codegen_spirv/build.rs index 6421463ba5..dcb3163d50 100644 --- a/crates/rustc_codegen_spirv/build.rs +++ b/crates/rustc_codegen_spirv/build.rs @@ -10,9 +10,9 @@ use std::process::{Command, ExitCode}; /// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/ //const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml"); const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain] -channel = "nightly-2023-09-30" +channel = "nightly-2023-11-26" components = ["rust-src", "rustc-dev", "llvm-tools"] -# commit_hash = 8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72"#; +# commit_hash = f5dc2653fdd8b5d177b2ccbd84057954340a89fc"#; fn get_rustc_commit_hash() -> Result> { let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc")); diff --git a/crates/rustc_codegen_spirv/src/abi.rs b/crates/rustc_codegen_spirv/src/abi.rs index fbe20ed462..e5833d6923 100644 --- a/crates/rustc_codegen_spirv/src/abi.rs +++ b/crates/rustc_codegen_spirv/src/abi.rs @@ -12,7 +12,7 @@ use rustc_middle::query::Providers; use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout}; use rustc_middle::ty::GenericArgsRef; use rustc_middle::ty::{ - self, Const, FloatTy, GeneratorArgs, IntTy, ParamEnv, PolyFnSig, Ty, TyCtxt, TyKind, + self, Const, FloatTy, CoroutineArgs, IntTy, ParamEnv, PolyFnSig, Ty, TyCtxt, TyKind, TypeAndMut, UintTy, }; use rustc_middle::{bug, span_bug}; @@ -64,6 +64,9 @@ pub(crate) fn provide(providers: &mut Providers) { ) -> &'tcx FnAbi<'tcx, Ty<'tcx>> { let readjust_arg_abi = |arg: &ArgAbi<'tcx, Ty<'tcx>>| { let mut arg = ArgAbi::new(&tcx, arg.layout, |_, _, _| ArgAttributes::new()); + // FIXME: this is bad! https://github.com/rust-lang/rust/issues/115666 + // + arg.make_direct_deprecated(); // Avoid pointlessly passing ZSTs, just like the official Rust ABI. if arg.layout.is_zst() { @@ -96,7 +99,7 @@ pub(crate) fn provide(providers: &mut Providers) { // FIXME(eddyb) remove this by deriving `Clone` for `LayoutS` upstream. // FIXME(eddyb) the `S` suffix is a naming antipattern, rename upstream. - fn clone_layout(layout: &LayoutS) -> LayoutS { + fn clone_layout(layout: &LayoutS) -> LayoutS { let LayoutS { ref fields, ref variants, @@ -744,7 +747,7 @@ fn trans_struct<'tcx>(cx: &CodegenCx<'tcx>, span: Span, ty: TyAndLayout<'tcx>) - fn def_id_for_spirv_type_adt(layout: TyAndLayout<'_>) -> Option { match *layout.ty.kind() { TyKind::Adt(def, _) => Some(def.did()), - TyKind::Foreign(def_id) | TyKind::Closure(def_id, _) | TyKind::Generator(def_id, ..) => { + TyKind::Foreign(def_id) | TyKind::Closure(def_id, _) | TyKind::Coroutine(def_id, ..) => { Some(def_id) } _ => None, @@ -779,8 +782,8 @@ impl fmt::Display for TyLayoutNameKey<'_> { write!(f, "::{}", def.variants()[index].name)?; } } - if let (TyKind::Generator(_, _, _), Some(index)) = (self.ty.kind(), self.variant) { - write!(f, "::{}", GeneratorArgs::variant_name(index))?; + if let (TyKind::Coroutine(_, _, _), Some(index)) = (self.ty.kind(), self.variant) { + write!(f, "::{}", CoroutineArgs::variant_name(index))?; } Ok(()) } diff --git a/crates/rustc_codegen_spirv/src/builder/builder_methods.rs b/crates/rustc_codegen_spirv/src/builder/builder_methods.rs index 86766ff75f..4e1cad8186 100644 --- a/crates/rustc_codegen_spirv/src/builder/builder_methods.rs +++ b/crates/rustc_codegen_spirv/src/builder/builder_methods.rs @@ -3037,7 +3037,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { self.intcast(val, dest_ty, false) } - fn do_not_inline(&mut self, _llret: Self::Value) { + fn apply_attrs_to_cleanup_callsite(&mut self, _llret: Self::Value) { // Ignore } } diff --git a/crates/rustc_codegen_spirv/src/builder/intrinsics.rs b/crates/rustc_codegen_spirv/src/builder/intrinsics.rs index 9d8b886ea8..8aafde7307 100644 --- a/crates/rustc_codegen_spirv/src/builder/intrinsics.rs +++ b/crates/rustc_codegen_spirv/src/builder/intrinsics.rs @@ -12,7 +12,7 @@ use rustc_codegen_ssa::traits::{BuilderMethods, IntrinsicCallMethods}; use rustc_middle::bug; use rustc_middle::ty::layout::LayoutOf; use rustc_middle::ty::{FnDef, Instance, ParamEnv, Ty, TyKind}; -use rustc_span::source_map::Span; +use rustc_span::Span; use rustc_span::sym; use rustc_target::abi::call::{FnAbi, PassMode}; use std::assert_matches::assert_matches; diff --git a/crates/rustc_codegen_spirv/src/builder/mod.rs b/crates/rustc_codegen_spirv/src/builder/mod.rs index 3ee0876455..9d46ea3fd5 100644 --- a/crates/rustc_codegen_spirv/src/builder/mod.rs +++ b/crates/rustc_codegen_spirv/src/builder/mod.rs @@ -29,7 +29,7 @@ use rustc_middle::ty::layout::{ }; use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt}; use rustc_span::def_id::DefId; -use rustc_span::source_map::Span; +use rustc_span::Span; use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode}; use rustc_target::abi::{HasDataLayout, Size, TargetDataLayout}; use rustc_target::spec::{HasTargetSpec, Target}; diff --git a/crates/rustc_codegen_spirv/src/builder_spirv.rs b/crates/rustc_codegen_spirv/src/builder_spirv.rs index 6a7c8e72a2..7d6249cafc 100644 --- a/crates/rustc_codegen_spirv/src/builder_spirv.rs +++ b/crates/rustc_codegen_spirv/src/builder_spirv.rs @@ -767,7 +767,7 @@ impl<'tcx> BuilderSpirv<'tcx> { FileName::Real(name) => { name.to_string_lossy(FileNameDisplayPreference::Remapped) } - _ => sf.name.prefer_remapped().to_string().into(), + _ => sf.name.prefer_remapped_unconditionaly().to_string().into(), }; let file_name = { // FIXME(eddyb) it should be possible to arena-allocate a diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/type_.rs b/crates/rustc_codegen_spirv/src/codegen_cx/type_.rs index 6effea59b9..c6a086c5a9 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/type_.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/type_.rs @@ -9,7 +9,8 @@ use rustc_middle::ty::layout::{ }; use rustc_middle::ty::Ty; use rustc_middle::{bug, span_bug}; -use rustc_span::source_map::{Span, Spanned, DUMMY_SP}; +use rustc_span::source_map::Spanned; +use rustc_span::{Span, DUMMY_SP}; use rustc_target::abi::call::{CastTarget, FnAbi, Reg}; use rustc_target::abi::{Abi, AddressSpace, FieldsShape}; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 884ca31985..98315c67df 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,7 +1,7 @@ [toolchain] -channel = "nightly-2023-09-30" +channel = "nightly-2023-11-26" components = ["rust-src", "rustc-dev", "llvm-tools"] -# commit_hash = 8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72 +# commit_hash = f5dc2653fdd8b5d177b2ccbd84057954340a89fc # Whenever changing the nightly channel, update the commit hash above, and make # sure to change `REQUIRED_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` also.