Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup: update to nightly-2023-11-26. #1102

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/1102) 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`
Expand Down
4 changes: 2 additions & 2 deletions crates/rustc_codegen_spirv/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Box<dyn Error>> {
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc"));
Expand Down
15 changes: 10 additions & 5 deletions crates/rustc_codegen_spirv/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, CoroutineArgs, FloatTy, IntTy, ParamEnv, PolyFnSig, Ty, TyCtxt, TyKind,
TypeAndMut, UintTy,
};
use rustc_middle::{bug, span_bug};
Expand Down Expand Up @@ -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
// <https://github.com/rust-lang/rust/commit/eaaa03faf77b157907894a4207d8378ecaec7b45>
arg.make_direct_deprecated();

// Avoid pointlessly passing ZSTs, just like the official Rust ABI.
if arg.layout.is_zst() {
Expand Down Expand Up @@ -96,7 +99,9 @@ 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<FieldIdx: Idx, VariantIdx: Idx>(
layout: &LayoutS<FieldIdx, VariantIdx>,
) -> LayoutS<FieldIdx, VariantIdx> {
let LayoutS {
ref fields,
ref variants,
Expand Down Expand Up @@ -744,7 +749,7 @@ fn trans_struct<'tcx>(cx: &CodegenCx<'tcx>, span: Span, ty: TyAndLayout<'tcx>) -
fn def_id_for_spirv_type_adt(layout: TyAndLayout<'_>) -> Option<DefId> {
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,
Expand Down Expand Up @@ -779,8 +784,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(())
}
Expand Down
2 changes: 1 addition & 1 deletion crates/rustc_codegen_spirv/src/builder/builder_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion crates/rustc_codegen_spirv/src/builder/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ 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::sym;
use rustc_span::Span;
use rustc_target::abi::call::{FnAbi, PassMode};
use std::assert_matches::assert_matches;

Expand Down
2 changes: 1 addition & 1 deletion crates/rustc_codegen_spirv/src/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion crates/rustc_codegen_spirv/src/builder_spirv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion crates/rustc_codegen_spirv/src/codegen_cx/type_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion crates/rustc_codegen_spirv/src/linker/dce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ fn instruction_is_pure(inst: &Instruction) -> bool {
| PtrEqual
| PtrNotEqual
| PtrDiff => true,
Variable => inst.operands.get(0) == Some(&Operand::StorageClass(StorageClass::Function)),
Variable => inst.operands.first() == Some(&Operand::StorageClass(StorageClass::Function)),
_ => false,
}
}
1 change: 1 addition & 0 deletions crates/rustc_codegen_spirv/src/linker/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ fn link_with_linker_opts(
rustc_interface::util::rustc_version_str().unwrap_or("unknown"),
Default::default(),
Default::default(),
Default::default(),
);

// HACK(eddyb) inject `write_diags` into `sess`, to work around
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 5 additions & 5 deletions tests/ui/dis/ptr_copy.normal.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: cannot memcpy dynamically sized data
--> $CORE_SRC/intrinsics.rs:2778:9
--> $CORE_SRC/intrinsics.rs:2776:9
|
2778 | copy(src, dst, count)
2776 | copy(src, dst, count)
| ^^^^^^^^^^^^^^^^^^^^^
|
note: used from within `core::intrinsics::copy::<f32>`
--> $CORE_SRC/intrinsics.rs:2764:21
--> $CORE_SRC/intrinsics.rs:2762:21
|
2764 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
2762 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
| ^^^^
note: called by `ptr_copy::copy_via_raw_ptr`
--> $DIR/ptr_copy.rs:28:18
Expand All @@ -25,5 +25,5 @@ note: called by `main`
32 | pub fn main(i: f32, o: &mut f32) {
| ^^^^

error: aborting due to previous error
error: aborting due to 1 previous error

2 changes: 1 addition & 1 deletion tests/ui/dis/ptr_read.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 1183 8
OpLine %8 1200 8
%9 = OpLoad %10 %4
OpLine %11 7 13
OpStore %6 %9
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/dis/ptr_read_method.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 1183 8
OpLine %8 1200 8
%9 = OpLoad %10 %4
OpLine %11 7 13
OpStore %6 %9
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/dis/ptr_write.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 7 35
%9 = OpLoad %10 %4
OpLine %11 1382 8
OpLine %11 1400 8
OpStore %6 %9
OpNoLine
OpReturn
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/dis/ptr_write_method.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 7 37
%9 = OpLoad %10 %4
OpLine %11 1382 8
OpLine %11 1400 8
OpStore %6 %9
OpNoLine
OpReturn
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/image/query/query_levels_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAM
881 | Self: HasQueryLevels,
| ^^^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>::query_levels`

error: aborting due to previous error
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
2 changes: 1 addition & 1 deletion tests/ui/image/query/query_lod_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAM
907 | Self: HasQueryLevels,
| ^^^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>::query_lod`

error: aborting due to previous error
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
2 changes: 1 addition & 1 deletion tests/ui/image/query/query_size_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAM
938 | Self: HasQuerySize,
| ^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>::query_size`

error: aborting due to previous error
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
2 changes: 1 addition & 1 deletion tests/ui/image/query/query_size_lod_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_st
982 | Self: HasQuerySizeLod,
| ^^^^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#7}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::query_size_lod`

error: aborting due to previous error
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
2 changes: 1 addition & 1 deletion tests/ui/lang/control_flow/issue_764.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: module has recursion, which is not allowed: `<(i32, issue_764::Transform2D) as issue_764::GivesFinalTransform>::get_final_transform` calls `<(i32, issue_764::Transform2D) as issue_764::GivesFinalTransform>::get_final_transform`

error: aborting due to previous error
error: aborting due to 1 previous error

2 changes: 1 addition & 1 deletion tests/ui/lang/core/ptr/allocate_const_scalar.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ note: called by `main`
15 | pub fn main(output: &mut Unique<[u8; 4]>) {
| ^^^^

error: aborting due to previous error
error: aborting due to 1 previous error

2 changes: 1 addition & 1 deletion tests/ui/lang/core/ref/member_ref_arg-broken.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ error: error:0:0 - OpLoad Pointer <id> '$ID[%$ID]' is not a logical pointer.
= note: spirv-val failed
= note: module `$TEST_BUILD_DIR/lang/core/ref/member_ref_arg-broken.default`

error: aborting due to previous error; 2 warnings emitted
error: aborting due to 1 previous error; 2 warnings emitted

4 changes: 2 additions & 2 deletions tests/ui/lang/core/unwrap_or.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
OpLine %5 13 11
%6 = OpCompositeInsert %7 %8 %9 0
%10 = OpCompositeExtract %11 %6 1
OpLine %12 956 14
OpLine %12 952 14
%13 = OpBitcast %14 %8
OpLine %12 956 8
OpLine %12 952 8
%15 = OpIEqual %16 %13 %17
OpNoLine
OpSelectionMerge %18 None
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/spirv-attr/invalid-matrix-type-empty.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ error: #[spirv(matrix)] type must have at least two fields
7 | pub struct EmptyStruct {}
| ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error
error: aborting due to 1 previous error

3 changes: 2 additions & 1 deletion tests/ui/spirv-attr/invalid-target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ fn _fn(
vertex, // fn-only
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
)]
(1, 2, 3) // expression
(1, 2, 3)
// expression
);

match () {
Expand Down
Loading
Loading