mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-21 14:24:13 +00:00
rustup: update to nightly-2023-09-30
.
This commit is contained in:
parent
145a98dae4
commit
83f8c72f04
@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Changed 🛠
|
### 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#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`
|
- [PR#1085](https://github.com/EmbarkStudios/rust-gpu/pull/1085) updated toolchain to `nightly-2023-07-08`
|
||||||
|
|
||||||
|
@ -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 :/
|
/// `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 = include_str!("../../rust-toolchain.toml");
|
||||||
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
|
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
|
||||||
channel = "nightly-2023-08-29"
|
channel = "nightly-2023-09-30"
|
||||||
components = ["rust-src", "rustc-dev", "llvm-tools"]
|
components = ["rust-src", "rustc-dev", "llvm-tools"]
|
||||||
# commit_hash = 4e78abb437a0478d1f42115198ee45888e5330fd"#;
|
# commit_hash = 8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72"#;
|
||||||
|
|
||||||
fn get_rustc_commit_hash() -> Result<String, Box<dyn Error>> {
|
fn get_rustc_commit_hash() -> Result<String, Box<dyn Error>> {
|
||||||
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc"));
|
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc"));
|
||||||
|
@ -8,7 +8,7 @@ use rspirv::spirv::{StorageClass, Word};
|
|||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxHashMap;
|
||||||
use rustc_errors::ErrorGuaranteed;
|
use rustc_errors::ErrorGuaranteed;
|
||||||
use rustc_index::Idx;
|
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::layout::{FnAbiOf, LayoutOf, TyAndLayout};
|
||||||
use rustc_middle::ty::GenericArgsRef;
|
use rustc_middle::ty::GenericArgsRef;
|
||||||
use rustc_middle::ty::{
|
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
|
/// 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
|
/// 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
|
/// 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 {
|
let return_type = match self.ret.mode {
|
||||||
PassMode::Ignore => SpirvType::Void.def(span, cx),
|
PassMode::Ignore => SpirvType::Void.def(span, cx),
|
||||||
PassMode::Direct(_) | PassMode::Pair(..) => self.ret.layout.spirv_type(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,
|
span,
|
||||||
"query hooks should've made this `PassMode` impossible: {:#?}",
|
"query hooks should've made this `PassMode` impossible: {:#?}",
|
||||||
self.ret
|
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));
|
argument_types.push(scalar_pair_element_backend_type(cx, span, arg.layout, 1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
PassMode::Cast(_, _) | PassMode::Indirect { .. } => span_bug!(
|
PassMode::Cast { .. } | PassMode::Indirect { .. } => span_bug!(
|
||||||
span,
|
span,
|
||||||
"query hooks should've made this `PassMode` impossible: {:#?}",
|
"query hooks should've made this `PassMode` impossible: {:#?}",
|
||||||
arg
|
arg
|
||||||
@ -867,7 +861,7 @@ fn trans_intrinsic_type<'tcx>(
|
|||||||
const_: Const<'tcx>,
|
const_: Const<'tcx>,
|
||||||
) -> Result<P, ErrorGuaranteed> {
|
) -> Result<P, ErrorGuaranteed> {
|
||||||
assert!(const_.ty().is_integral());
|
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) {
|
match P::from_u128(value) {
|
||||||
Some(v) => Ok(v),
|
Some(v) => Ok(v),
|
||||||
None => Err(cx
|
None => Err(cx
|
||||||
|
@ -181,7 +181,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||||||
}
|
}
|
||||||
// PassMode::Pair is identical to PassMode::Direct - it's returned as a struct
|
// PassMode::Pair is identical to PassMode::Direct - it's returned as a struct
|
||||||
PassMode::Direct(_) | PassMode::Pair(_, _) => (),
|
PassMode::Direct(_) | PassMode::Pair(_, _) => (),
|
||||||
PassMode::Cast(_, _) => {
|
PassMode::Cast { .. } => {
|
||||||
self.fatal("PassMode::Cast not supported in codegen_buffer_load_intrinsic")
|
self.fatal("PassMode::Cast not supported in codegen_buffer_load_intrinsic")
|
||||||
}
|
}
|
||||||
PassMode::Indirect { .. } => {
|
PassMode::Indirect { .. } => {
|
||||||
@ -349,7 +349,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||||||
PassMode::Ignore => return,
|
PassMode::Ignore => return,
|
||||||
PassMode::Direct(_) => false,
|
PassMode::Direct(_) => false,
|
||||||
PassMode::Pair(_, _) => true,
|
PassMode::Pair(_, _) => true,
|
||||||
PassMode::Cast(_, _) => {
|
PassMode::Cast { .. } => {
|
||||||
self.fatal("PassMode::Cast not supported in codegen_buffer_store_intrinsic")
|
self.fatal("PassMode::Cast not supported in codegen_buffer_store_intrinsic")
|
||||||
}
|
}
|
||||||
PassMode::Indirect { .. } => {
|
PassMode::Indirect { .. } => {
|
||||||
|
@ -309,7 +309,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
|
|||||||
PassMode::Pair(..) => {
|
PassMode::Pair(..) => {
|
||||||
OperandValue::Pair(next(self, idx), next(self, idx)).store(self, dst);
|
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(),
|
self.span(),
|
||||||
"query hooks should've made this `PassMode` impossible: {:#?}",
|
"query hooks should've made this `PassMode` impossible: {:#?}",
|
||||||
arg_abi
|
arg_abi
|
||||||
@ -328,7 +328,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
|
|||||||
PassMode::Direct(_) | PassMode::Pair(..) => {
|
PassMode::Direct(_) | PassMode::Pair(..) => {
|
||||||
OperandValue::Immediate(val).store(self, dst);
|
OperandValue::Immediate(val).store(self, dst);
|
||||||
}
|
}
|
||||||
PassMode::Cast(_, _) | PassMode::Indirect { .. } => span_bug!(
|
PassMode::Cast { .. } | PassMode::Indirect { .. } => span_bug!(
|
||||||
self.span(),
|
self.span(),
|
||||||
"query hooks should've made this `PassMode` impossible: {:#?}",
|
"query hooks should've made this `PassMode` impossible: {:#?}",
|
||||||
arg_abi
|
arg_abi
|
||||||
|
@ -790,7 +790,7 @@ impl<'tcx> BuilderSpirv<'tcx> {
|
|||||||
|
|
||||||
let file_contents = self
|
let file_contents = self
|
||||||
.source_map
|
.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();
|
.ok();
|
||||||
|
|
||||||
// HACK(eddyb) this logic is duplicated from `spirt::spv::lift`.
|
// HACK(eddyb) this logic is duplicated from `spirt::spv::lift`.
|
||||||
|
@ -18,8 +18,8 @@ use rustc_codegen_ssa::traits::{
|
|||||||
AsmMethods, BackendTypes, DebugInfoMethods, GlobalAsmOperandRef, MiscMethods,
|
AsmMethods, BackendTypes, DebugInfoMethods, GlobalAsmOperandRef, MiscMethods,
|
||||||
};
|
};
|
||||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||||
|
use rustc_middle::mir;
|
||||||
use rustc_middle::mir::mono::CodegenUnit;
|
use rustc_middle::mir::mono::CodegenUnit;
|
||||||
use rustc_middle::mir::Body;
|
|
||||||
use rustc_middle::ty::layout::{HasParamEnv, HasTyCtxt};
|
use rustc_middle::ty::layout::{HasParamEnv, HasTyCtxt};
|
||||||
use rustc_middle::ty::{Instance, ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt};
|
use rustc_middle::ty::{Instance, ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt};
|
||||||
use rustc_session::Session;
|
use rustc_session::Session;
|
||||||
@ -861,8 +861,8 @@ impl<'tcx> DebugInfoMethods<'tcx> for CodegenCx<'tcx> {
|
|||||||
_instance: Instance<'tcx>,
|
_instance: Instance<'tcx>,
|
||||||
_fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
|
_fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
|
||||||
_llfn: Self::Function,
|
_llfn: Self::Function,
|
||||||
_mir: &Body<'_>,
|
_mir: &mir::Body<'tcx>,
|
||||||
) -> Option<FunctionDebugContext<Self::DIScope, Self::DILocation>> {
|
) -> Option<FunctionDebugContext<'tcx, Self::DIScope, Self::DILocation>> {
|
||||||
// TODO: This is ignored. Do we want to implement this at some point?
|
// TODO: This is ignored. Do we want to implement this at some point?
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
@ -458,8 +458,7 @@ impl<'a> SpanRegenerator<'a> {
|
|||||||
// Only use this `FileName` candidate if we either:
|
// Only use this `FileName` candidate if we either:
|
||||||
// 1. reused a `SourceFile` with the right `src`/`external_src`
|
// 1. reused a `SourceFile` with the right `src`/`external_src`
|
||||||
// 2. allocated a new `SourceFile` with our choice of `src`
|
// 2. allocated a new `SourceFile` with our choice of `src`
|
||||||
self.source_map
|
self.source_map.ensure_source_file_source_present(&sf);
|
||||||
.ensure_source_file_source_present(sf.clone());
|
|
||||||
let sf_src_matches = sf
|
let sf_src_matches = sf
|
||||||
.src
|
.src
|
||||||
.as_ref()
|
.as_ref()
|
||||||
@ -499,7 +498,7 @@ impl<'a> SpanRegenerator<'a> {
|
|||||||
let multibyte_chars = {
|
let multibyte_chars = {
|
||||||
let find = |bpos| {
|
let find = |bpos| {
|
||||||
file.multibyte_chars
|
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)
|
.unwrap_or_else(|x| x)
|
||||||
};
|
};
|
||||||
let Range { start, end } = line_bpos_range;
|
let Range { start, end } = line_bpos_range;
|
||||||
@ -508,7 +507,7 @@ impl<'a> SpanRegenerator<'a> {
|
|||||||
let non_narrow_chars = {
|
let non_narrow_chars = {
|
||||||
let find = |bpos| {
|
let find = |bpos| {
|
||||||
file.non_narrow_chars
|
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)
|
.unwrap_or_else(|x| x)
|
||||||
};
|
};
|
||||||
let Range { start, end } = line_bpos_range;
|
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).
|
// 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);
|
let (mut cur_bpos, mut cur_col_display) = (line_bpos_range.start, 0);
|
||||||
while cur_bpos < line_bpos_range.end && cur_col_display < col {
|
while cur_bpos < line_bpos_range.end && cur_col_display < col {
|
||||||
let next_special_bpos = special_chars.peek().map(|special| {
|
let next_special_bpos = special_chars
|
||||||
special
|
.peek()
|
||||||
.as_ref()
|
.map(|special| {
|
||||||
.map_any(|mbc| mbc.pos, |nnc| nnc.pos())
|
special
|
||||||
.reduce(|x, _| x)
|
.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`).
|
// Batch trivial chars (i.e. chars 1:1 wrt `BytePos` vs `col_display`).
|
||||||
let following_trivial_chars =
|
let following_trivial_chars =
|
||||||
|
@ -104,7 +104,6 @@ use rustc_metadata::EncodedMetadata;
|
|||||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
|
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
|
||||||
use rustc_middle::mir::mono::{MonoItem, MonoItemData};
|
use rustc_middle::mir::mono::{MonoItem, MonoItemData};
|
||||||
use rustc_middle::mir::pretty::write_mir_pretty;
|
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::print::with_no_trimmed_paths;
|
||||||
use rustc_middle::ty::{self, Instance, InstanceDef, TyCtxt};
|
use rustc_middle::ty::{self, Instance, InstanceDef, TyCtxt};
|
||||||
use rustc_session::config::{self, OutputFilenames, OutputType};
|
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
|
// FIXME(eddyb) this is currently only passed back to us, specifically
|
||||||
// into `target_machine_factory` (which is a noop), but it might make
|
// into `target_machine_factory` (which is a noop), but it might make
|
||||||
// sense to move some of the target feature parsing into here.
|
// sense to move some of the target feature parsing into here.
|
||||||
@ -229,10 +228,6 @@ impl CodegenBackend for SpirvCodegenBackend {
|
|||||||
crate::attr::provide(providers);
|
crate::attr::provide(providers);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn provide_extern(&self, providers: &mut query::ExternProviders) {
|
|
||||||
crate::abi::provide_extern(providers);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn codegen_crate(
|
fn codegen_crate(
|
||||||
&self,
|
&self,
|
||||||
tcx: TyCtxt<'_>,
|
tcx: TyCtxt<'_>,
|
||||||
|
@ -616,11 +616,10 @@ pub(crate) fn run_thin(
|
|||||||
if cgcx.opts.cg.linker_plugin_lto.enabled() {
|
if cgcx.opts.cg.linker_plugin_lto.enabled() {
|
||||||
unreachable!("We should never reach this case if the LTO step is deferred to the linker");
|
unreachable!("We should never reach this case if the LTO step is deferred to the linker");
|
||||||
}
|
}
|
||||||
if cgcx.lto != Lto::ThinLocal {
|
assert!(
|
||||||
for _ in cgcx.each_linked_rlib_for_lto.iter() {
|
cgcx.lto == Lto::ThinLocal,
|
||||||
bug!("TODO: Implement whatever the heck this is");
|
"no actual LTO implemented in Rust-GPU"
|
||||||
}
|
);
|
||||||
}
|
|
||||||
let mut thin_buffers = Vec::with_capacity(modules.len());
|
let mut thin_buffers = Vec::with_capacity(modules.len());
|
||||||
let mut module_names = Vec::with_capacity(modules.len() + cached_modules.len());
|
let mut module_names = Vec::with_capacity(modules.len() + cached_modules.len());
|
||||||
|
|
||||||
|
@ -146,14 +146,15 @@ fn link_with_linker_opts(
|
|||||||
output_file: None,
|
output_file: None,
|
||||||
temps_dir: None,
|
temps_dir: None,
|
||||||
},
|
},
|
||||||
None,
|
Default::default(),
|
||||||
Registry::new(&[]),
|
Registry::new(&[]),
|
||||||
Default::default(),
|
Default::default(),
|
||||||
Default::default(),
|
Default::default(),
|
||||||
None,
|
Default::default(),
|
||||||
None,
|
Default::default(),
|
||||||
rustc_interface::util::rustc_version_str().unwrap_or("unknown"),
|
rustc_interface::util::rustc_version_str().unwrap_or("unknown"),
|
||||||
None,
|
Default::default(),
|
||||||
|
Default::default(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// HACK(eddyb) inject `write_diags` into `sess`, to work around
|
// HACK(eddyb) inject `write_diags` into `sess`, to work around
|
||||||
@ -179,6 +180,7 @@ fn link_with_linker_opts(
|
|||||||
modules,
|
modules,
|
||||||
opts,
|
opts,
|
||||||
&OutputFilenames::new(
|
&OutputFilenames::new(
|
||||||
|
"".into(),
|
||||||
"".into(),
|
"".into(),
|
||||||
"".into(),
|
"".into(),
|
||||||
None,
|
None,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2023-08-29"
|
channel = "nightly-2023-09-30"
|
||||||
components = ["rust-src", "rustc-dev", "llvm-tools"]
|
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
|
# 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.
|
# sure to change `REQUIRED_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` also.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
error: cannot memcpy dynamically sized data
|
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::<f32>`
|
note: used from within `core::intrinsics::copy::<f32>`
|
||||||
--> $CORE_SRC/intrinsics.rs:2757:21
|
--> $CORE_SRC/intrinsics.rs:2764:21
|
||||||
|
|
|
|
||||||
2757 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
|
2764 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
|
||||||
| ^^^^
|
| ^^^^
|
||||||
note: called by `ptr_copy::copy_via_raw_ptr`
|
note: called by `ptr_copy::copy_via_raw_ptr`
|
||||||
--> $DIR/ptr_copy.rs:28:18
|
--> $DIR/ptr_copy.rs:28:18
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
%4 = OpFunctionParameter %5
|
%4 = OpFunctionParameter %5
|
||||||
%6 = OpFunctionParameter %5
|
%6 = OpFunctionParameter %5
|
||||||
%7 = OpLabel
|
%7 = OpLabel
|
||||||
OpLine %8 1180 8
|
OpLine %8 1183 8
|
||||||
%9 = OpLoad %10 %4
|
%9 = OpLoad %10 %4
|
||||||
OpLine %11 7 13
|
OpLine %11 7 13
|
||||||
OpStore %6 %9
|
OpStore %6 %9
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
%4 = OpFunctionParameter %5
|
%4 = OpFunctionParameter %5
|
||||||
%6 = OpFunctionParameter %5
|
%6 = OpFunctionParameter %5
|
||||||
%7 = OpLabel
|
%7 = OpLabel
|
||||||
OpLine %8 1180 8
|
OpLine %8 1183 8
|
||||||
%9 = OpLoad %10 %4
|
%9 = OpLoad %10 %4
|
||||||
OpLine %11 7 13
|
OpLine %11 7 13
|
||||||
OpStore %6 %9
|
OpStore %6 %9
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%7 = OpLabel
|
%7 = OpLabel
|
||||||
OpLine %8 7 35
|
OpLine %8 7 35
|
||||||
%9 = OpLoad %10 %4
|
%9 = OpLoad %10 %4
|
||||||
OpLine %11 1379 8
|
OpLine %11 1382 8
|
||||||
OpStore %6 %9
|
OpStore %6 %9
|
||||||
OpNoLine
|
OpNoLine
|
||||||
OpReturn
|
OpReturn
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%7 = OpLabel
|
%7 = OpLabel
|
||||||
OpLine %8 7 37
|
OpLine %8 7 37
|
||||||
%9 = OpLoad %10 %4
|
%9 = OpLoad %10 %4
|
||||||
OpLine %11 1379 8
|
OpLine %11 1382 8
|
||||||
OpStore %6 %9
|
OpStore %6 %9
|
||||||
OpNoLine
|
OpNoLine
|
||||||
OpReturn
|
OpReturn
|
||||||
|
@ -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<usize>) {
|
||||||
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: cannot cast between pointer types
|
error: cannot cast between pointer types
|
||||||
from `*u32`
|
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<usize>) {
|
||||||
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: cannot cast between pointer types
|
||||||
|
from `*u8`
|
||||||
to `*struct B { }`
|
to `*struct B { }`
|
||||||
--> $DIR/zst_member_ref_arg-broken.rs:23:5
|
--> $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<usize>) {
|
22 | pub fn main_scalar(#[spirv(push_constant)] s: &S<usize>) {
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
|
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<usize, usize>) {
|
||||||
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: cannot cast between pointer types
|
error: cannot cast between pointer types
|
||||||
from `*struct S<usize, usize> { u32, u32 }`
|
from `*struct S<usize, usize> { 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<usize, usize>) {
|
||||||
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: cannot cast between pointer types
|
||||||
|
from `*u8`
|
||||||
to `*struct B { }`
|
to `*struct B { }`
|
||||||
--> $DIR/zst_member_ref_arg-broken.rs:28:5
|
--> $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<usize, usize>) {
|
27 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S<usize, usize>) {
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
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
|
error: cannot cast between pointer types
|
||||||
from `*struct (usize, usize) { u32, u32 }`
|
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 { }`
|
to `*struct B { }`
|
||||||
--> $DIR/zst_member_ref_arg-broken.rs:33:5
|
--> $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)>) {
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user