From 86f36bf1d853d0fd890c3591927410c1845deca7 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 21 Nov 2023 18:34:57 +0200 Subject: [PATCH] rustup: update to `nightly-2023-09-30`. --- CHANGELOG.md | 1 + crates/rustc_codegen_spirv/build.rs | 4 +- crates/rustc_codegen_spirv/src/abi.rs | 14 +-- .../src/builder/byte_addressable_buffer.rs | 4 +- crates/rustc_codegen_spirv/src/builder/mod.rs | 4 +- .../rustc_codegen_spirv/src/builder_spirv.rs | 2 +- .../rustc_codegen_spirv/src/codegen_cx/mod.rs | 6 +- .../src/custom_decorations.rs | 22 ++-- crates/rustc_codegen_spirv/src/lib.rs | 7 +- crates/rustc_codegen_spirv/src/link.rs | 9 +- crates/rustc_codegen_spirv/src/linker/test.rs | 10 +- rust-toolchain.toml | 4 +- tests/ui/dis/ptr_copy.normal.stderr | 8 +- tests/ui/dis/ptr_read.stderr | 2 +- tests/ui/dis/ptr_read_method.stderr | 2 +- tests/ui/dis/ptr_write.stderr | 2 +- tests/ui/dis/ptr_write_method.stderr | 2 +- .../core/ref/zst_member_ref_arg-broken.stderr | 110 +++++++++++++++++- 18 files changed, 157 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f71d4d5c0b..e144609a24 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#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 e69bcd95f1..6421463ba5 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-08-29" +channel = "nightly-2023-09-30" components = ["rust-src", "rustc-dev", "llvm-tools"] -# commit_hash = 4e78abb437a0478d1f42115198ee45888e5330fd"#; +# commit_hash = 8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72"#; 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 bea2231fce..fbe20ed462 100644 --- a/crates/rustc_codegen_spirv/src/abi.rs +++ b/crates/rustc_codegen_spirv/src/abi.rs @@ -8,7 +8,7 @@ use rspirv::spirv::{StorageClass, Word}; use rustc_data_structures::fx::FxHashMap; use rustc_errors::ErrorGuaranteed; use rustc_index::Idx; -use rustc_middle::query::{ExternProviders, Providers}; +use rustc_middle::query::Providers; use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout}; use rustc_middle::ty::GenericArgsRef; use rustc_middle::ty::{ @@ -174,12 +174,6 @@ pub(crate) fn provide(providers: &mut Providers) { }; } -pub(crate) fn provide_extern(providers: &mut ExternProviders) { - // Reset providers overriden in `provide`, that need to still go through the - // `rustc_metadata::rmeta` decoding, as opposed to being locally computed. - providers.fn_sig = rustc_interface::DEFAULT_EXTERN_QUERY_PROVIDERS.fn_sig; -} - /// If a struct contains a pointer to itself, even indirectly, then doing a naiive recursive walk /// of the fields will result in an infinite loop. Because pointers are the only thing that are /// allowed to be recursive, keep track of what pointers we've translated, or are currently in the @@ -312,7 +306,7 @@ impl<'tcx> ConvSpirvType<'tcx> for FnAbi<'tcx, Ty<'tcx>> { let return_type = match self.ret.mode { PassMode::Ignore => SpirvType::Void.def(span, cx), PassMode::Direct(_) | PassMode::Pair(..) => self.ret.layout.spirv_type(span, cx), - PassMode::Cast(_, _) | PassMode::Indirect { .. } => span_bug!( + PassMode::Cast { .. } | PassMode::Indirect { .. } => span_bug!( span, "query hooks should've made this `PassMode` impossible: {:#?}", self.ret @@ -328,7 +322,7 @@ impl<'tcx> ConvSpirvType<'tcx> for FnAbi<'tcx, Ty<'tcx>> { argument_types.push(scalar_pair_element_backend_type(cx, span, arg.layout, 1)); continue; } - PassMode::Cast(_, _) | PassMode::Indirect { .. } => span_bug!( + PassMode::Cast { .. } | PassMode::Indirect { .. } => span_bug!( span, "query hooks should've made this `PassMode` impossible: {:#?}", arg @@ -867,7 +861,7 @@ fn trans_intrinsic_type<'tcx>( const_: Const<'tcx>, ) -> Result { assert!(const_.ty().is_integral()); - let value = const_.eval_bits(cx.tcx, ParamEnv::reveal_all(), const_.ty()); + let value = const_.eval_bits(cx.tcx, ParamEnv::reveal_all()); match P::from_u128(value) { Some(v) => Ok(v), None => Err(cx diff --git a/crates/rustc_codegen_spirv/src/builder/byte_addressable_buffer.rs b/crates/rustc_codegen_spirv/src/builder/byte_addressable_buffer.rs index 902ed8a756..1248da7f80 100644 --- a/crates/rustc_codegen_spirv/src/builder/byte_addressable_buffer.rs +++ b/crates/rustc_codegen_spirv/src/builder/byte_addressable_buffer.rs @@ -181,7 +181,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } // PassMode::Pair is identical to PassMode::Direct - it's returned as a struct PassMode::Direct(_) | PassMode::Pair(_, _) => (), - PassMode::Cast(_, _) => { + PassMode::Cast { .. } => { self.fatal("PassMode::Cast not supported in codegen_buffer_load_intrinsic") } PassMode::Indirect { .. } => { @@ -349,7 +349,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { PassMode::Ignore => return, PassMode::Direct(_) => false, PassMode::Pair(_, _) => true, - PassMode::Cast(_, _) => { + PassMode::Cast { .. } => { self.fatal("PassMode::Cast not supported in codegen_buffer_store_intrinsic") } PassMode::Indirect { .. } => { diff --git a/crates/rustc_codegen_spirv/src/builder/mod.rs b/crates/rustc_codegen_spirv/src/builder/mod.rs index d15585960a..3ee0876455 100644 --- a/crates/rustc_codegen_spirv/src/builder/mod.rs +++ b/crates/rustc_codegen_spirv/src/builder/mod.rs @@ -309,7 +309,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> { PassMode::Pair(..) => { OperandValue::Pair(next(self, idx), next(self, idx)).store(self, dst); } - PassMode::Cast(_, _) | PassMode::Indirect { .. } => span_bug!( + PassMode::Cast { .. } | PassMode::Indirect { .. } => span_bug!( self.span(), "query hooks should've made this `PassMode` impossible: {:#?}", arg_abi @@ -328,7 +328,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> { PassMode::Direct(_) | PassMode::Pair(..) => { OperandValue::Immediate(val).store(self, dst); } - PassMode::Cast(_, _) | PassMode::Indirect { .. } => span_bug!( + PassMode::Cast { .. } | PassMode::Indirect { .. } => span_bug!( self.span(), "query hooks should've made this `PassMode` impossible: {:#?}", arg_abi diff --git a/crates/rustc_codegen_spirv/src/builder_spirv.rs b/crates/rustc_codegen_spirv/src/builder_spirv.rs index 56993f4245..6a7c8e72a2 100644 --- a/crates/rustc_codegen_spirv/src/builder_spirv.rs +++ b/crates/rustc_codegen_spirv/src/builder_spirv.rs @@ -790,7 +790,7 @@ impl<'tcx> BuilderSpirv<'tcx> { let file_contents = self .source_map - .span_to_snippet(Span::with_root_ctxt(sf.start_pos, sf.end_pos)) + .span_to_snippet(Span::with_root_ctxt(sf.start_pos, sf.end_position())) .ok(); // HACK(eddyb) this logic is duplicated from `spirt::spv::lift`. diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs index 2f9d0d9dec..e9a378d038 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs @@ -18,8 +18,8 @@ use rustc_codegen_ssa::traits::{ AsmMethods, BackendTypes, DebugInfoMethods, GlobalAsmOperandRef, MiscMethods, }; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; +use rustc_middle::mir; use rustc_middle::mir::mono::CodegenUnit; -use rustc_middle::mir::Body; use rustc_middle::ty::layout::{HasParamEnv, HasTyCtxt}; use rustc_middle::ty::{Instance, ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt}; use rustc_session::Session; @@ -861,8 +861,8 @@ impl<'tcx> DebugInfoMethods<'tcx> for CodegenCx<'tcx> { _instance: Instance<'tcx>, _fn_abi: &FnAbi<'tcx, Ty<'tcx>>, _llfn: Self::Function, - _mir: &Body<'_>, - ) -> Option> { + _mir: &mir::Body<'tcx>, + ) -> Option> { // TODO: This is ignored. Do we want to implement this at some point? None } diff --git a/crates/rustc_codegen_spirv/src/custom_decorations.rs b/crates/rustc_codegen_spirv/src/custom_decorations.rs index 242280c1d6..90844487d6 100644 --- a/crates/rustc_codegen_spirv/src/custom_decorations.rs +++ b/crates/rustc_codegen_spirv/src/custom_decorations.rs @@ -458,8 +458,7 @@ impl<'a> SpanRegenerator<'a> { // Only use this `FileName` candidate if we either: // 1. reused a `SourceFile` with the right `src`/`external_src` // 2. allocated a new `SourceFile` with our choice of `src` - self.source_map - .ensure_source_file_source_present(sf.clone()); + self.source_map.ensure_source_file_source_present(&sf); let sf_src_matches = sf .src .as_ref() @@ -499,7 +498,7 @@ impl<'a> SpanRegenerator<'a> { let multibyte_chars = { let find = |bpos| { file.multibyte_chars - .binary_search_by_key(&bpos, |mbc| mbc.pos) + .binary_search_by_key(&file.relative_position(bpos), |mbc| mbc.pos) .unwrap_or_else(|x| x) }; let Range { start, end } = line_bpos_range; @@ -508,7 +507,7 @@ impl<'a> SpanRegenerator<'a> { let non_narrow_chars = { let find = |bpos| { file.non_narrow_chars - .binary_search_by_key(&bpos, |nnc| nnc.pos()) + .binary_search_by_key(&file.relative_position(bpos), |nnc| nnc.pos()) .unwrap_or_else(|x| x) }; let Range { start, end } = line_bpos_range; @@ -524,12 +523,15 @@ impl<'a> SpanRegenerator<'a> { // itself is even worse than this, when it comes to `BytePos` lookups). let (mut cur_bpos, mut cur_col_display) = (line_bpos_range.start, 0); while cur_bpos < line_bpos_range.end && cur_col_display < col { - let next_special_bpos = special_chars.peek().map(|special| { - special - .as_ref() - .map_any(|mbc| mbc.pos, |nnc| nnc.pos()) - .reduce(|x, _| x) - }); + let next_special_bpos = special_chars + .peek() + .map(|special| { + special + .as_ref() + .map_any(|mbc| mbc.pos, |nnc| nnc.pos()) + .reduce(|x, _| x) + }) + .map(|rel_bpos| file.absolute_position(rel_bpos)); // Batch trivial chars (i.e. chars 1:1 wrt `BytePos` vs `col_display`). let following_trivial_chars = diff --git a/crates/rustc_codegen_spirv/src/lib.rs b/crates/rustc_codegen_spirv/src/lib.rs index 99cb405790..89e81668f0 100644 --- a/crates/rustc_codegen_spirv/src/lib.rs +++ b/crates/rustc_codegen_spirv/src/lib.rs @@ -104,7 +104,6 @@ use rustc_metadata::EncodedMetadata; use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; use rustc_middle::mir::mono::{MonoItem, MonoItemData}; use rustc_middle::mir::pretty::write_mir_pretty; -use rustc_middle::query; use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, Instance, InstanceDef, TyCtxt}; use rustc_session::config::{self, OutputFilenames, OutputType}; @@ -219,7 +218,7 @@ impl CodegenBackend for SpirvCodegenBackend { } } - fn provide(&self, providers: &mut query::Providers) { + fn provide(&self, providers: &mut rustc_middle::util::Providers) { // FIXME(eddyb) this is currently only passed back to us, specifically // into `target_machine_factory` (which is a noop), but it might make // sense to move some of the target feature parsing into here. @@ -229,10 +228,6 @@ impl CodegenBackend for SpirvCodegenBackend { crate::attr::provide(providers); } - fn provide_extern(&self, providers: &mut query::ExternProviders) { - crate::abi::provide_extern(providers); - } - fn codegen_crate( &self, tcx: TyCtxt<'_>, diff --git a/crates/rustc_codegen_spirv/src/link.rs b/crates/rustc_codegen_spirv/src/link.rs index d1b8710320..08df00797b 100644 --- a/crates/rustc_codegen_spirv/src/link.rs +++ b/crates/rustc_codegen_spirv/src/link.rs @@ -616,11 +616,10 @@ pub(crate) fn run_thin( if cgcx.opts.cg.linker_plugin_lto.enabled() { unreachable!("We should never reach this case if the LTO step is deferred to the linker"); } - if cgcx.lto != Lto::ThinLocal { - for _ in cgcx.each_linked_rlib_for_lto.iter() { - bug!("TODO: Implement whatever the heck this is"); - } - } + assert!( + cgcx.lto == Lto::ThinLocal, + "no actual LTO implemented in Rust-GPU" + ); let mut thin_buffers = Vec::with_capacity(modules.len()); let mut module_names = Vec::with_capacity(modules.len() + cached_modules.len()); diff --git a/crates/rustc_codegen_spirv/src/linker/test.rs b/crates/rustc_codegen_spirv/src/linker/test.rs index 63916cc209..7e92b89f47 100644 --- a/crates/rustc_codegen_spirv/src/linker/test.rs +++ b/crates/rustc_codegen_spirv/src/linker/test.rs @@ -146,14 +146,15 @@ fn link_with_linker_opts( output_file: None, temps_dir: None, }, - None, + Default::default(), Registry::new(&[]), Default::default(), Default::default(), - None, - None, + Default::default(), + Default::default(), rustc_interface::util::rustc_version_str().unwrap_or("unknown"), - None, + Default::default(), + Default::default(), ); // HACK(eddyb) inject `write_diags` into `sess`, to work around @@ -179,6 +180,7 @@ fn link_with_linker_opts( modules, opts, &OutputFilenames::new( + "".into(), "".into(), "".into(), None, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7bba50d68b..884ca31985 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,7 +1,7 @@ [toolchain] -channel = "nightly-2023-08-29" +channel = "nightly-2023-09-30" components = ["rust-src", "rustc-dev", "llvm-tools"] -# commit_hash = 4e78abb437a0478d1f42115198ee45888e5330fd +# commit_hash = 8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72 # 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. diff --git a/tests/ui/dis/ptr_copy.normal.stderr b/tests/ui/dis/ptr_copy.normal.stderr index 196c73353e..43c045e5b8 100644 --- a/tests/ui/dis/ptr_copy.normal.stderr +++ b/tests/ui/dis/ptr_copy.normal.stderr @@ -1,13 +1,13 @@ error: cannot memcpy dynamically sized data - --> $CORE_SRC/intrinsics.rs:2771:9 + --> $CORE_SRC/intrinsics.rs:2778:9 | -2771 | copy(src, dst, count) +2778 | copy(src, dst, count) | ^^^^^^^^^^^^^^^^^^^^^ | note: used from within `core::intrinsics::copy::` - --> $CORE_SRC/intrinsics.rs:2757:21 + --> $CORE_SRC/intrinsics.rs:2764:21 | -2757 | pub const unsafe fn copy(src: *const T, dst: *mut T, count: usize) { +2764 | pub const unsafe fn copy(src: *const T, dst: *mut T, count: usize) { | ^^^^ note: called by `ptr_copy::copy_via_raw_ptr` --> $DIR/ptr_copy.rs:28:18 diff --git a/tests/ui/dis/ptr_read.stderr b/tests/ui/dis/ptr_read.stderr index 7ec82f82f5..722af616d8 100644 --- a/tests/ui/dis/ptr_read.stderr +++ b/tests/ui/dis/ptr_read.stderr @@ -2,7 +2,7 @@ %4 = OpFunctionParameter %5 %6 = OpFunctionParameter %5 %7 = OpLabel -OpLine %8 1180 8 +OpLine %8 1183 8 %9 = OpLoad %10 %4 OpLine %11 7 13 OpStore %6 %9 diff --git a/tests/ui/dis/ptr_read_method.stderr b/tests/ui/dis/ptr_read_method.stderr index 7ec82f82f5..722af616d8 100644 --- a/tests/ui/dis/ptr_read_method.stderr +++ b/tests/ui/dis/ptr_read_method.stderr @@ -2,7 +2,7 @@ %4 = OpFunctionParameter %5 %6 = OpFunctionParameter %5 %7 = OpLabel -OpLine %8 1180 8 +OpLine %8 1183 8 %9 = OpLoad %10 %4 OpLine %11 7 13 OpStore %6 %9 diff --git a/tests/ui/dis/ptr_write.stderr b/tests/ui/dis/ptr_write.stderr index 5d3995f906..b86b31d184 100644 --- a/tests/ui/dis/ptr_write.stderr +++ b/tests/ui/dis/ptr_write.stderr @@ -4,7 +4,7 @@ %7 = OpLabel OpLine %8 7 35 %9 = OpLoad %10 %4 -OpLine %11 1379 8 +OpLine %11 1382 8 OpStore %6 %9 OpNoLine OpReturn diff --git a/tests/ui/dis/ptr_write_method.stderr b/tests/ui/dis/ptr_write_method.stderr index 2ee93c4b9c..013ba2e906 100644 --- a/tests/ui/dis/ptr_write_method.stderr +++ b/tests/ui/dis/ptr_write_method.stderr @@ -4,7 +4,7 @@ %7 = OpLabel OpLine %8 7 37 %9 = OpLoad %10 %4 -OpLine %11 1379 8 +OpLine %11 1382 8 OpStore %6 %9 OpNoLine OpReturn diff --git a/tests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr b/tests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr index d2f24359aa..126ff058ac 100644 --- a/tests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr +++ b/tests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr @@ -1,5 +1,41 @@ +error: cannot offset a pointer to an arbitrary element + --> $DIR/zst_member_ref_arg-broken.rs:23:7 + | +23 | f(&s.y); + | ^^^^ + | +note: used from within `zst_member_ref_arg_broken::main_scalar` + --> $DIR/zst_member_ref_arg-broken.rs:23:7 + | +23 | f(&s.y); + | ^^^^ +note: called by `main_scalar` + --> $DIR/zst_member_ref_arg-broken.rs:22:8 + | +22 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { + | ^^^^^^^^^^^ + error: cannot cast between pointer types from `*u32` + to `*u8` + --> $DIR/zst_member_ref_arg-broken.rs:23:7 + | +23 | f(&s.y); + | ^^^^ + | +note: used from within `zst_member_ref_arg_broken::main_scalar` + --> $DIR/zst_member_ref_arg-broken.rs:23:7 + | +23 | f(&s.y); + | ^^^^ +note: called by `main_scalar` + --> $DIR/zst_member_ref_arg-broken.rs:22:8 + | +22 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { + | ^^^^^^^^^^^ + +error: cannot cast between pointer types + from `*u8` to `*struct B { }` --> $DIR/zst_member_ref_arg-broken.rs:23:5 | @@ -17,8 +53,44 @@ note: called by `main_scalar` 22 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^ +error: cannot offset a pointer to an arbitrary element + --> $DIR/zst_member_ref_arg-broken.rs:28:7 + | +28 | f(&s.y); + | ^^^^ + | +note: used from within `zst_member_ref_arg_broken::main_scalar_pair` + --> $DIR/zst_member_ref_arg-broken.rs:28:7 + | +28 | f(&s.y); + | ^^^^ +note: called by `main_scalar_pair` + --> $DIR/zst_member_ref_arg-broken.rs:27:8 + | +27 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { + | ^^^^^^^^^^^^^^^^ + error: cannot cast between pointer types from `*struct S { u32, u32 }` + to `*u8` + --> $DIR/zst_member_ref_arg-broken.rs:28:7 + | +28 | f(&s.y); + | ^^^^ + | +note: used from within `zst_member_ref_arg_broken::main_scalar_pair` + --> $DIR/zst_member_ref_arg-broken.rs:28:7 + | +28 | f(&s.y); + | ^^^^ +note: called by `main_scalar_pair` + --> $DIR/zst_member_ref_arg-broken.rs:27:8 + | +27 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { + | ^^^^^^^^^^^^^^^^ + +error: cannot cast between pointer types + from `*u8` to `*struct B { }` --> $DIR/zst_member_ref_arg-broken.rs:28:5 | @@ -36,8 +108,44 @@ note: called by `main_scalar_pair` 27 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^^^^^^ +error: cannot offset a pointer to an arbitrary element + --> $DIR/zst_member_ref_arg-broken.rs:33:7 + | +33 | f(&s.y); + | ^^^^ + | +note: used from within `zst_member_ref_arg_broken::main_scalar_scalar_pair_nested` + --> $DIR/zst_member_ref_arg-broken.rs:33:7 + | +33 | f(&s.y); + | ^^^^ +note: called by `main_scalar_scalar_pair_nested` + --> $DIR/zst_member_ref_arg-broken.rs:32:8 + | +32 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: cannot cast between pointer types from `*struct (usize, usize) { u32, u32 }` + to `*u8` + --> $DIR/zst_member_ref_arg-broken.rs:33:7 + | +33 | f(&s.y); + | ^^^^ + | +note: used from within `zst_member_ref_arg_broken::main_scalar_scalar_pair_nested` + --> $DIR/zst_member_ref_arg-broken.rs:33:7 + | +33 | f(&s.y); + | ^^^^ +note: called by `main_scalar_scalar_pair_nested` + --> $DIR/zst_member_ref_arg-broken.rs:32:8 + | +32 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: cannot cast between pointer types + from `*u8` to `*struct B { }` --> $DIR/zst_member_ref_arg-broken.rs:33:5 | @@ -55,5 +163,5 @@ note: called by `main_scalar_scalar_pair_nested` 32 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors +error: aborting due to 9 previous errors