diff --git a/.cargo/config.toml b/.cargo/config.toml index 946679c0889..69ee514ab6a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -32,7 +32,7 @@ rustflags = [ "-Wclippy::dbg_macro", "-Wclippy::debug_assert_with_mut_call", "-Wclippy::doc_markdown", - "-Wclippy::empty_enum", + "-Wclippy::empty_enums", "-Wclippy::enum_glob_use", "-Wclippy::exit", "-Wclippy::expl_impl_clone_on_copy", @@ -82,7 +82,6 @@ rustflags = [ "-Wclippy::string_add_assign", "-Wclippy::string_add", "-Wclippy::string_lit_as_bytes", - "-Wclippy::string_to_string", "-Wclippy::todo", "-Wclippy::trait_duplication_in_bounds", "-Wclippy::unimplemented", diff --git a/Cargo.lock b/Cargo.lock index ed781d90609..e0b1ed7a7bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2743,6 +2743,7 @@ dependencies = [ "spirt", "spirv-std-types", "spirv-tools", + "termcolor", "thorin-dwp", "tracing", "tracing-subscriber", diff --git a/crates/rustc_codegen_spirv-types/src/target_spec.rs b/crates/rustc_codegen_spirv-types/src/target_spec.rs index 67d339423b9..3af35c8a8cc 100644 --- a/crates/rustc_codegen_spirv-types/src/target_spec.rs +++ b/crates/rustc_codegen_spirv-types/src/target_spec.rs @@ -16,6 +16,8 @@ pub enum TargetSpecVersion { /// Some later version requires them. /// Some earlier version fails with them (notably our 0.9.0 release). Rustc_1_76_0, + /// rustc 1.93 requires that the value of "target-pointer-width" is no longer a string but u16 + Rustc_1_93_0, } impl TargetSpecVersion { @@ -39,7 +41,9 @@ impl TargetSpecVersion { /// Returns the version of the target spec required for a certain rustc version. May return `None` if the version /// is old enough to not need target specs. pub fn from_rustc_version(rustc_version: Version) -> Option { - if rustc_version >= Version::new(1, 85, 0) { + if rustc_version >= Version::new(1, 93, 0) { + Some(Self::Rustc_1_93_0) + } else if rustc_version >= Version::new(1, 85, 0) { Some(Self::Rustc_1_85_0) } else if rustc_version >= Version::new(1, 76, 0) { Some(Self::Rustc_1_76_0) @@ -52,8 +56,12 @@ impl TargetSpecVersion { pub fn format_spec(&self, target: &SpirvTarget) -> String { let target_env = target.env(); let extra = match self { - TargetSpecVersion::Rustc_1_85_0 => r#""crt-static-respected": true,"#, TargetSpecVersion::Rustc_1_76_0 => r#""os": "unknown","#, + _ => r#""crt-static-respected": true,"#, + }; + let target_pointer_width = match self { + TargetSpecVersion::Rustc_1_76_0 | TargetSpecVersion::Rustc_1_85_0 => "\"32\"", + TargetSpecVersion::Rustc_1_93_0 => "32", }; format!( r#"{{ @@ -80,7 +88,7 @@ impl TargetSpecVersion { {extra} "panic-strategy": "abort", "simd-types-indirect": false, - "target-pointer-width": "32" + "target-pointer-width": {target_pointer_width} }}"# ) } diff --git a/crates/rustc_codegen_spirv/Cargo.toml b/crates/rustc_codegen_spirv/Cargo.toml index 2357ae1f7f3..ed72fbd2800 100644 --- a/crates/rustc_codegen_spirv/Cargo.toml +++ b/crates/rustc_codegen_spirv/Cargo.toml @@ -64,6 +64,7 @@ tracing-tree = "0.4.0" [dev-dependencies] pretty_assertions = "1.0" +termcolor = "1.1.3" # HACK(eddyb) can't re-introduce deps of `rustc_codegen_ssa`, for `pqp_cg_ssa` # (see `build.rs`). diff --git a/crates/rustc_codegen_spirv/build.rs b/crates/rustc_codegen_spirv/build.rs index 96fe4a5f595..e21c94726dc 100644 --- a/crates/rustc_codegen_spirv/build.rs +++ b/crates/rustc_codegen_spirv/build.rs @@ -19,9 +19,9 @@ use std::{env, fs, mem}; /// `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-2025-08-04" +channel = "nightly-2025-11-13" components = ["rust-src", "rustc-dev", "llvm-tools"] -# commit_hash = f34ba774c78ea32b7c40598b8ad23e75cdac42a6"#; +# commit_hash = 01867557cd7dbe256a031a7b8e28d05daecd75ab"#; fn rustc_output(arg: &str) -> Result> { let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".into()); @@ -135,6 +135,10 @@ fn generate_pqp_cg_ssa() -> Result<(), Box> { } let in_path = entry.path(); + + if in_path.ends_with(".DS_Store") { + continue; + } let out_path = out_dir.join(entry.file_name()); let mut src = fs::read_to_string(in_path)?; @@ -198,6 +202,13 @@ mod win {", for link_path in raw_dylib::", ); } + src = src.replace( + " + for (link_path, as_needed) in raw_dylib::", + " + #[cfg(any())] + for (link_path, as_needed) in raw_dylib::", + ); if relative_path == Path::new("src/back/metadata.rs") { // HACK(eddyb) remove `object` dependency. src = src.replace( diff --git a/crates/rustc_codegen_spirv/src/builder/builder_methods.rs b/crates/rustc_codegen_spirv/src/builder/builder_methods.rs index 0d0b809fa29..b05000bd763 100644 --- a/crates/rustc_codegen_spirv/src/builder/builder_methods.rs +++ b/crates/rustc_codegen_spirv/src/builder/builder_methods.rs @@ -1917,6 +1917,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { OperandRef { val, layout: place.layout, + move_annotation: None, } } @@ -2792,6 +2793,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { _src_align: Align, size: Self::Value, flags: MemFlags, + _tt: Option, ) { if flags != MemFlags::empty() { self.err(format!( @@ -2878,7 +2880,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { size: Self::Value, flags: MemFlags, ) { - self.memcpy(dst, dst_align, src, src_align, size, flags); + self.memcpy(dst, dst_align, src, src_align, size, flags, None); } fn memset( @@ -3124,6 +3126,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> { dst: Self::Value, src: Self::Value, order: AtomicOrdering, + _ret_ptr: bool, ) -> Self::Value { let ty = src.ty; diff --git a/crates/rustc_codegen_spirv/src/builder/mod.rs b/crates/rustc_codegen_spirv/src/builder/mod.rs index 07c89669610..19eb997d605 100644 --- a/crates/rustc_codegen_spirv/src/builder/mod.rs +++ b/crates/rustc_codegen_spirv/src/builder/mod.rs @@ -174,7 +174,7 @@ impl<'a, 'tcx> CoverageInfoBuilderMethods<'tcx> for Builder<'a, 'tcx> { fn add_coverage(&mut self, _instance: Instance<'tcx>, _kind: &CoverageKind) {} } -impl<'a, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'tcx> { +impl<'a, 'tcx> DebugInfoBuilderMethods<'_> for Builder<'a, 'tcx> { fn dbg_var_addr( &mut self, _dbg_var: Self::DIVariable, @@ -183,7 +183,7 @@ impl<'a, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'tcx> { _direct_offset: Size, // NB: each offset implies a deref (i.e. they're steps in a pointer chain). _indirect_offsets: &[Size], - _fragment: Option>, + _fragment: &Option>, ) { todo!() } @@ -203,6 +203,21 @@ impl<'a, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'tcx> { fn set_var_name(&mut self, _value: Self::Value, _name: &str) { todo!() } + + fn dbg_var_value( + &mut self, + _dbg_var: Self::DIVariable, + _dbg_loc: Self::DILocation, + _value: Self::Value, + _direct_offset: Size, + // NB: each offset implies a deref (i.e. they're steps in a pointer chain). + _indirect_offsets: &[Size], + // Byte range in the `dbg_var` covered by this fragment, + // if this is a fragment of a composite `DIVariable`. + _fragment: &Option>, + ) { + todo!() + } } impl<'a, 'tcx> ArgAbiBuilderMethods<'tcx> for Builder<'a, 'tcx> { diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/constant.rs b/crates/rustc_codegen_spirv/src/codegen_cx/constant.rs index 3e3f97a48ed..f4e73354d62 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/constant.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/constant.rs @@ -506,8 +506,7 @@ impl<'tcx> CodegenCx<'tcx> { // HACK(eddyb) these should never happen when using // `read_scalar`, but better not outright crash. - AllocError::ScalarSizeMismatch(_) - | AllocError::OverwritePartialPointer(_) => { + AllocError::ScalarSizeMismatch(_) => { Err(format!("unrecognized `AllocError::{err:?}`")) } }, diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/declare.rs b/crates/rustc_codegen_spirv/src/codegen_cx/declare.rs index 9dbb827ddb5..71eeb5085ac 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/declare.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/declare.rs @@ -11,10 +11,10 @@ use itertools::Itertools; use rspirv::spirv::{FunctionControl, LinkageType, StorageClass, Word}; use rustc_abi::Align; use rustc_codegen_ssa::traits::{PreDefineCodegenMethods, StaticCodegenMethods}; -use rustc_hir::attrs::InlineAttr; +use rustc_hir::attrs::{InlineAttr, Linkage}; use rustc_middle::bug; use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs}; -use rustc_middle::mir::mono::{Linkage, MonoItem, Visibility}; +use rustc_middle::mir::mono::{MonoItem, Visibility}; use rustc_middle::ty::layout::{FnAbiOf, LayoutOf}; use rustc_middle::ty::{self, Instance, TypeVisitableExt, TypingEnv}; use rustc_span::Span; @@ -178,7 +178,7 @@ impl<'tcx> CodegenCx<'tcx> { // Check if this is a From trait implementation if let Some(impl_def_id) = self.tcx.impl_of_assoc(def_id) - && let Some(trait_ref) = self.tcx.impl_trait_ref(impl_def_id) + && let Some(trait_ref) = self.tcx.impl_opt_trait_ref(impl_def_id) { let trait_def_id = trait_ref.skip_binder().def_id; diff --git a/crates/rustc_codegen_spirv/src/lib.rs b/crates/rustc_codegen_spirv/src/lib.rs index 0e15cebf248..3523d3a4acd 100644 --- a/crates/rustc_codegen_spirv/src/lib.rs +++ b/crates/rustc_codegen_spirv/src/lib.rs @@ -1,5 +1,4 @@ // HACK(eddyb) start of `rustc_codegen_ssa` crate-level attributes (see `build.rs`). -#![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] #![feature(assert_matches)] @@ -7,7 +6,6 @@ #![feature(file_buffered)] #![feature(if_let_guard)] #![feature(negative_impls)] -#![feature(rustdoc_internals)] #![feature(string_from_utf8_lossy_owned)] #![feature(trait_alias)] #![feature(try_blocks)] @@ -151,10 +149,9 @@ use maybe_pqp_cg_ssa::traits::{ }; use maybe_pqp_cg_ssa::{CodegenResults, CompiledModule, ModuleCodegen, ModuleKind, TargetConfig}; use rspirv::binary::Assemble; -use rustc_ast::expand::allocator::AllocatorKind; -use rustc_ast::expand::autodiff_attrs::AutoDiffItem; +use rustc_ast::expand::allocator::AllocatorMethod; use rustc_data_structures::fx::FxIndexMap; -use rustc_errors::{DiagCtxtHandle, FatalError}; +use rustc_errors::DiagCtxtHandle; use rustc_metadata::EncodedMetadata; use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; use rustc_middle::mir::mono::{MonoItem, MonoItemData}; @@ -281,6 +278,10 @@ impl CodegenBackend for SpirvCodegenBackend { ); drop(timer); } + + fn name(&self) -> &'static str { + "SpirvCodegenBackend" + } } struct SpirvModuleBuffer(Vec); @@ -299,16 +300,13 @@ impl ThinBufferMethods for SpirvModuleBuffer { fn data(&self) -> &[u8] { self.as_bytes() } - fn thin_link_data(&self) -> &[u8] { - &[] - } } impl SpirvCodegenBackend { fn optimize_common( _cgcx: &CodegenContext, module: &mut ModuleCodegen<::Module>, - ) -> Result<(), FatalError> { + ) { // Apply DCE ("dead code elimination") to modules before ever serializing // them as `.spv` files (technically, `.rcgu.o` files inside `.rlib`s), // that will later get linked (potentially many times, esp. if this is @@ -317,8 +315,6 @@ impl SpirvCodegenBackend { linker::dce::dce(&mut module.module_llvm); // FIXME(eddyb) run as many optimization passes as possible, not just DCE. - - Ok(()) } } @@ -339,8 +335,7 @@ impl WriteBackendMethods for SpirvCodegenBackend { _exported_symbols_for_lto: &[String], _each_linked_rlib_for_lto: &[PathBuf], _modules: Vec>, - _diff_fncs: Vec, - ) -> Result, FatalError> { + ) -> ModuleCodegen { assert!( cgcx.lto == rustc_session::config::Lto::Fat, "`run_and_optimize_fat_lto` (for `WorkItemResult::NeedsFatLto`) should \ @@ -356,7 +351,7 @@ impl WriteBackendMethods for SpirvCodegenBackend { _each_linked_rlib_for_lto: &[PathBuf], // njn: ? modules: Vec<(String, Self::ThinBuffer)>, cached_modules: Vec<(SerializedModule, WorkProduct)>, - ) -> Result<(Vec>, Vec), FatalError> { + ) -> (Vec>, Vec) { link::run_thin(cgcx, modules, cached_modules) } @@ -373,14 +368,14 @@ impl WriteBackendMethods for SpirvCodegenBackend { _dcx: DiagCtxtHandle<'_>, module: &mut ModuleCodegen, _config: &ModuleConfig, - ) -> Result<(), FatalError> { - Self::optimize_common(cgcx, module) + ) { + Self::optimize_common(cgcx, module); } fn optimize_thin( cgcx: &CodegenContext, thin_module: ThinModule, - ) -> Result, FatalError> { + ) -> ModuleCodegen { // FIXME(eddyb) the inefficiency of Module -> [u8] -> Module roundtrips // comes from upstream and it applies to `rustc_codegen_llvm` as well, // eventually it should be properly addressed (for `ThinLocal` at least). @@ -393,15 +388,15 @@ impl WriteBackendMethods for SpirvCodegenBackend { kind: ModuleKind::Regular, thin_lto_buffer: None, }; - Self::optimize_common(cgcx, &mut module)?; - Ok(module) + Self::optimize_common(cgcx, &mut module); + module } fn codegen( cgcx: &CodegenContext, module: ModuleCodegen, _config: &ModuleConfig, - ) -> Result { + ) -> CompiledModule { let kind = module.kind; let (name, module_buffer) = Self::serialize_module(module); @@ -412,7 +407,7 @@ impl WriteBackendMethods for SpirvCodegenBackend { ); fs::write(&path, module_buffer.as_bytes()).unwrap(); - Ok(CompiledModule { + CompiledModule { name, kind, object: Some(path), @@ -421,13 +416,10 @@ impl WriteBackendMethods for SpirvCodegenBackend { assembly: None, llvm_ir: None, links_from_incr_cache: vec![], - }) + } } - fn prepare_thin( - module: ModuleCodegen, - _want_summary: bool, - ) -> (String, Self::ThinBuffer) { + fn prepare_thin(module: ModuleCodegen) -> (String, Self::ThinBuffer) { Self::serialize_module(module) } @@ -440,13 +432,7 @@ impl WriteBackendMethods for SpirvCodegenBackend { } impl ExtraBackendMethods for SpirvCodegenBackend { - fn codegen_allocator( - &self, - _: TyCtxt<'_>, - _: &str, - _: AllocatorKind, - _: AllocatorKind, - ) -> Self::Module { + fn codegen_allocator(&self, _: TyCtxt<'_>, _: &str, _: &[AllocatorMethod]) -> Self::Module { todo!() } diff --git a/crates/rustc_codegen_spirv/src/link.rs b/crates/rustc_codegen_spirv/src/link.rs index 6e129c491c8..205cba0ca63 100644 --- a/crates/rustc_codegen_spirv/src/link.rs +++ b/crates/rustc_codegen_spirv/src/link.rs @@ -7,12 +7,14 @@ use ar::{Archive, GnuBuilder, Header}; use rspirv::binary::Assemble; use rspirv::dr::Module; use rustc_ast::CRATE_NODE_ID; +use rustc_attr_parsing::{ShouldEmit, eval_config_entry}; use rustc_codegen_spirv_types::{CompileResult, ModuleResult}; use rustc_codegen_ssa::back::lto::{SerializedModule, ThinModule, ThinShared}; use rustc_codegen_ssa::back::write::CodegenContext; use rustc_codegen_ssa::{CodegenResults, NativeLib}; use rustc_data_structures::fx::FxHashSet; -use rustc_errors::{Diag, FatalError}; +use rustc_errors::Diag; +use rustc_hir::attrs::NativeLibKind; use rustc_metadata::{EncodedMetadata, fs::METADATA_FILENAME}; use rustc_middle::bug; use rustc_middle::dep_graph::WorkProduct; @@ -22,14 +24,15 @@ use rustc_session::config::{ CrateType, DebugInfo, Lto, OptLevel, OutFileName, OutputFilenames, OutputType, }; use rustc_session::output::{check_file_is_writeable, invalid_output_for_target, out_filename}; -use rustc_session::utils::NativeLibKind; use rustc_span::Symbol; +use spirv_tools::TargetEnv; use std::collections::BTreeMap; use std::ffi::{CString, OsStr}; use std::fs::File; use std::io::{BufWriter, Read}; use std::iter; use std::path::{Path, PathBuf}; +use std::str::FromStr; use std::sync::Arc; pub fn link( @@ -336,7 +339,8 @@ fn do_spirv_opt( opt::{self, Optimizer}, }; - let mut optimizer = opt::create(sess.target.options.env.parse().ok()); + let target_env = TargetEnv::from_str(sess.target.options.env.desc()).ok(); + let mut optimizer = opt::create(target_env); match sess.opts.optimize { OptLevel::No => {} @@ -398,7 +402,8 @@ fn do_spirv_val( ) { use spirv_tools::val::{self, Validator}; - let validator = val::create(sess.target.options.env.parse().ok()); + let target_env = TargetEnv::from_str(sess.target.options.env.desc()).ok(); + let validator = val::create(target_env); if let Err(e) = validator.validate(spv_binary, Some(options)) { let mut err = sess.dcx().struct_err(e.to_string()); @@ -496,7 +501,9 @@ fn add_upstream_native_libraries( // (see `compiler/rustc_codegen_ssa/src/back/link.rs`) fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool { match lib.cfg { - Some(ref cfg) => rustc_attr_parsing::cfg_matches(cfg, sess, CRATE_NODE_ID, None), + Some(ref cfg) => { + eval_config_entry(sess, cfg, CRATE_NODE_ID, ShouldEmit::ErrorsAndLints).as_bool() + } None => true, } } @@ -634,7 +641,7 @@ pub(crate) fn run_thin( cgcx: &CodegenContext, modules: Vec<(String, SpirvModuleBuffer)>, cached_modules: Vec<(SerializedModule, WorkProduct)>, -) -> Result<(Vec>, Vec), FatalError> { +) -> (Vec>, Vec) { if cgcx.opts.cg.linker_plugin_lto.enabled() { unreachable!("We should never reach this case if the LTO step is deferred to the linker"); } @@ -674,5 +681,5 @@ pub(crate) fn run_thin( }); } - Ok((opt_jobs, vec![])) + (opt_jobs, vec![]) } diff --git a/crates/rustc_codegen_spirv/src/linker/test.rs b/crates/rustc_codegen_spirv/src/linker/test.rs index 3fdd7185af5..e71e31b493b 100644 --- a/crates/rustc_codegen_spirv/src/linker/test.rs +++ b/crates/rustc_codegen_spirv/src/linker/test.rs @@ -6,13 +6,6 @@ use rustc_session::config::{Input, OutputFilenames, OutputTypes}; use rustc_span::FileName; use std::io::Write; use std::sync::{Arc, Mutex}; - -// `termcolor` is needed because we cannot construct an Emitter after it was added in -// https://github.com/rust-lang/rust/pull/114104. This can be removed when -// https://github.com/rust-lang/rust/pull/115393 lands. -// We need to construct an emitter as yet another workaround, -// see https://github.com/rust-lang/rust/pull/102992. -extern crate termcolor; use termcolor::{ColorSpec, WriteColor}; // https://github.com/colin-kiegel/rust-pretty-assertions/issues/24 @@ -162,7 +155,6 @@ fn link_with_linker_opts( rustc_interface::util::rustc_version_str().unwrap_or("unknown"), Default::default(), &rustc_driver_impl::USING_INTERNAL_FEATURES, - Default::default(), ); // HACK(eddyb) inject `write_diags` into `sess`, to work around @@ -171,7 +163,7 @@ fn link_with_linker_opts( let source_map = sess.psess.clone_source_map(); let emitter = rustc_errors::emitter::HumanEmitter::new( - Box::new(buf), + rustc_errors::AutoStream::new(Box::new(buf), rustc_errors::ColorChoice::Never), rustc_driver_impl::default_translator(), ) .sm(Some(source_map.clone())); @@ -193,6 +185,7 @@ fn link_with_linker_opts( "".into(), None, None, + None, "".into(), OutputTypes::new(&[]), ), diff --git a/crates/rustc_codegen_spirv/src/target.rs b/crates/rustc_codegen_spirv/src/target.rs index 71390f9b8da..08be3c27e0c 100644 --- a/crates/rustc_codegen_spirv/src/target.rs +++ b/crates/rustc_codegen_spirv/src/target.rs @@ -1,5 +1,5 @@ use rspirv::spirv::MemoryModel; -use rustc_target::spec::{Cc, LinkerFlavor, PanicStrategy, Target, TargetOptions}; +use rustc_target::spec::{Arch, Cc, Env, LinkerFlavor, PanicStrategy, Target, TargetOptions}; use spirv_tools::TargetEnv; const ARCH: &str = "spirv"; @@ -61,8 +61,9 @@ impl SpirvTarget { o.emit_debug_gdb_scripts = false; o.linker_flavor = LinkerFlavor::Unix(Cc::No); o.panic_strategy = PanicStrategy::Abort; - o.env = self.env.to_string().into(); - o.vendor = self.vendor.clone().into(); + o.env = Env::Other(self.env.to_string().into()); + // Note(@firestar99): not sure if this does anything + o.is_like_gpu = true; // TODO: Investigate if main_needs_argc_argv is useful (for building exes) o.main_needs_argc_argv = false; o @@ -74,7 +75,7 @@ impl SpirvTarget { metadata: Default::default(), pointer_width: 32, data_layout: "e-m:e-p:32:32:32-i64:64-n8:16:32:64".into(), - arch: ARCH.into(), + arch: Arch::Other(ARCH.into()), options: self.init_target_opts(), } } diff --git a/crates/spirv-builder/src/lib.rs b/crates/spirv-builder/src/lib.rs index 9adfb3d112d..96d1d10bee8 100644 --- a/crates/spirv-builder/src/lib.rs +++ b/crates/spirv-builder/src/lib.rs @@ -12,7 +12,7 @@ clippy::dbg_macro, clippy::debug_assert_with_mut_call, clippy::doc_markdown, - clippy::empty_enum, + clippy::empty_enums, clippy::enum_glob_use, clippy::exit, clippy::expl_impl_clone_on_copy, @@ -53,7 +53,6 @@ clippy::string_add_assign, clippy::string_add, clippy::string_lit_as_bytes, - clippy::string_to_string, clippy::todo, clippy::trait_duplication_in_bounds, clippy::unimplemented, diff --git a/crates/spirv-std/macros/src/lib.rs b/crates/spirv-std/macros/src/lib.rs index 05d14af6ed6..b88a1f1725f 100644 --- a/crates/spirv-std/macros/src/lib.rs +++ b/crates/spirv-std/macros/src/lib.rs @@ -12,7 +12,7 @@ clippy::dbg_macro, clippy::debug_assert_with_mut_call, clippy::doc_markdown, - clippy::empty_enum, + clippy::empty_enums, clippy::enum_glob_use, clippy::exit, clippy::expl_impl_clone_on_copy, @@ -53,7 +53,6 @@ clippy::string_add_assign, clippy::string_add, clippy::string_lit_as_bytes, - clippy::string_to_string, clippy::todo, clippy::trait_duplication_in_bounds, clippy::unimplemented, diff --git a/crates/spirv-std/src/lib.rs b/crates/spirv-std/src/lib.rs index 6e178fe8749..c701f8d2282 100644 --- a/crates/spirv-std/src/lib.rs +++ b/crates/spirv-std/src/lib.rs @@ -18,7 +18,7 @@ clippy::dbg_macro, clippy::debug_assert_with_mut_call, clippy::doc_markdown, - clippy::empty_enum, + clippy::empty_enums, clippy::enum_glob_use, clippy::exit, clippy::expl_impl_clone_on_copy, @@ -59,7 +59,6 @@ clippy::string_add_assign, clippy::string_add, clippy::string_lit_as_bytes, - clippy::string_to_string, clippy::todo, clippy::trait_duplication_in_bounds, clippy::unimplemented, diff --git a/examples/runners/ash/src/main.rs b/examples/runners/ash/src/main.rs index a62d58709f8..61c1aaee92d 100644 --- a/examples/runners/ash/src/main.rs +++ b/examples/runners/ash/src/main.rs @@ -12,7 +12,7 @@ clippy::dbg_macro, clippy::debug_assert_with_mut_call, clippy::doc_markdown, - clippy::empty_enum, + clippy::empty_enums, clippy::enum_glob_use, clippy::exit, clippy::expl_impl_clone_on_copy, @@ -53,7 +53,6 @@ clippy::string_add_assign, clippy::string_add, clippy::string_lit_as_bytes, - clippy::string_to_string, clippy::todo, clippy::trait_duplication_in_bounds, clippy::unimplemented, diff --git a/examples/runners/cpu/src/main.rs b/examples/runners/cpu/src/main.rs index 318f729a5d4..4dd1f75c21f 100644 --- a/examples/runners/cpu/src/main.rs +++ b/examples/runners/cpu/src/main.rs @@ -12,7 +12,7 @@ clippy::dbg_macro, clippy::debug_assert_with_mut_call, clippy::doc_markdown, - clippy::empty_enum, + clippy::empty_enums, clippy::enum_glob_use, clippy::exit, clippy::expl_impl_clone_on_copy, @@ -53,7 +53,6 @@ clippy::string_add_assign, clippy::string_add, clippy::string_lit_as_bytes, - clippy::string_to_string, clippy::todo, clippy::trait_duplication_in_bounds, clippy::unimplemented, diff --git a/examples/runners/wgpu/src/lib.rs b/examples/runners/wgpu/src/lib.rs index 58dcbf677ec..cb918dfa39e 100644 --- a/examples/runners/wgpu/src/lib.rs +++ b/examples/runners/wgpu/src/lib.rs @@ -12,7 +12,7 @@ clippy::dbg_macro, clippy::debug_assert_with_mut_call, clippy::doc_markdown, - clippy::empty_enum, + clippy::empty_enums, clippy::enum_glob_use, clippy::exit, clippy::expl_impl_clone_on_copy, @@ -53,7 +53,6 @@ clippy::string_add_assign, clippy::string_add, clippy::string_lit_as_bytes, - clippy::string_to_string, clippy::todo, clippy::trait_duplication_in_bounds, clippy::unimplemented, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2dad704aad0..42702799260 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,7 +1,7 @@ [toolchain] -channel = "nightly-2025-08-04" +channel = "nightly-2025-11-13" components = ["rust-src", "rustc-dev", "llvm-tools"] -# commit_hash = f34ba774c78ea32b7c40598b8ad23e75cdac42a6 +# commit_hash = 01867557cd7dbe256a031a7b8e28d05daecd75ab # Whenever changing the nightly channel, update the commit hash above, and # change `REQUIRED_RUST_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` too. diff --git a/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_0_fail.stderr b/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_0_fail.stderr index d5f06bdb4b2..f6e00334ed6 100644 --- a/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_0_fail.stderr +++ b/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_0_fail.stderr @@ -26,7 +26,7 @@ LL | | "); | = note: this note originates in the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info) -note: the above error was encountered while instantiating `fn spirv_std::arch::subgroup_clustered_i_add::<0, u32, u32>` +note: the above error was encountered while instantiating `fn subgroup_clustered_i_add::<0, u32, u32>` --> $DIR/subgroup_cluster_size_0_fail.rs:10:5 | LL | spirv_std::arch::subgroup_clustered_i_add::<0, _>(value) diff --git a/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_non_power_of_two_fail.stderr b/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_non_power_of_two_fail.stderr index db300c3e121..2ce25684953 100644 --- a/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_non_power_of_two_fail.stderr +++ b/tests/compiletests/ui/arch/subgroup/subgroup_cluster_size_non_power_of_two_fail.stderr @@ -26,7 +26,7 @@ LL | | "); | = note: this note originates in the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info) -note: the above error was encountered while instantiating `fn spirv_std::arch::subgroup_clustered_i_add::<5, u32, u32>` +note: the above error was encountered while instantiating `fn subgroup_clustered_i_add::<5, u32, u32>` --> $DIR/subgroup_cluster_size_non_power_of_two_fail.rs:10:5 | LL | spirv_std::arch::subgroup_clustered_i_add::<5, _>(value) diff --git a/tests/compiletests/ui/arch/subgroup/subgroup_composite_enum_err.stderr b/tests/compiletests/ui/arch/subgroup/subgroup_composite_enum_err.stderr index c30f70f2da3..174b5d911a7 100644 --- a/tests/compiletests/ui/arch/subgroup/subgroup_composite_enum_err.stderr +++ b/tests/compiletests/ui/arch/subgroup/subgroup_composite_enum_err.stderr @@ -60,14 +60,19 @@ LL | #[repr(u16)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0277]: the trait bound `NoFrom: From` is not satisfied --> $DIR/subgroup_composite_enum_err.rs: | LL | #[derive(Copy, Clone, Default, ScalarComposite)] - | ^^^^^^^^^^^^^^^ the trait `From` is not implemented for `NoFrom` + | ^^^^^^^^^^^^^^^ unsatisfied trait bound | +help: the trait `From` is not implemented for `NoFrom` + --> $DIR/subgroup_composite_enum_err.rs: + | +LL | pub enum NoFrom { + | ^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `ScalarComposite` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `i32: From` is not satisfied @@ -90,12 +95,19 @@ error[E0277]: the trait bound `WrongFrom: From` is not satisfied --> $DIR/subgroup_composite_enum_err.rs: | LL | #[derive(Copy, Clone, Default, ScalarComposite)] - | ^^^^^^^^^^^^^^^ the trait `From` is not implemented for `WrongFrom` + | ^^^^^^^^^^^^^^^ unsatisfied trait bound + | +help: the trait `From` is not implemented for `WrongFrom` + but trait `From` is implemented for it + --> $DIR/subgroup_composite_enum_err.rs: | - = help: the trait `From` is not implemented for `WrongFrom` - but trait `From` is implemented for it +LL | impl From<$repr> for $ident { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | enum_repr_from!(WrongFrom, u32); + | ------------------------------- in this macro invocation = help: for that trait implementation, expected `u32`, found `i32` - = note: this error originates in the derive macro `ScalarComposite` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `ScalarComposite` which comes from the expansion of the macro `enum_repr_from` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `i32: From` is not satisfied --> $DIR/subgroup_composite_enum_err.rs: diff --git a/tests/compiletests/ui/dis/issue-1062.stderr b/tests/compiletests/ui/dis/issue-1062.stderr index 5019327bfb5..9a72a047cb3 100644 --- a/tests/compiletests/ui/dis/issue-1062.stderr +++ b/tests/compiletests/ui/dis/issue-1062.stderr @@ -4,7 +4,7 @@ OpLine %5 11 12 %6 = OpLoad %7 %8 OpLine %5 11 35 %9 = OpLoad %7 %10 -OpLine %11 1128 4 +OpLine %11 1134 4 %12 = OpBitwiseAnd %7 %9 %13 %14 = OpISub %7 %15 %12 %16 = OpShiftLeftLogical %7 %6 %12 diff --git a/tests/compiletests/ui/dis/panic_builtin_bounds_check.stderr b/tests/compiletests/ui/dis/panic_builtin_bounds_check.stderr index a3bee642b1b..6486f832eb2 100644 --- a/tests/compiletests/ui/dis/panic_builtin_bounds_check.stderr +++ b/tests/compiletests/ui/dis/panic_builtin_bounds_check.stderr @@ -4,7 +4,7 @@ OpExtension "SPV_KHR_non_semantic_info" OpMemoryModel Logical Simple OpEntryPoint Fragment %2 "main" OpExecutionMode %2 OriginUpperLeft -%3 = OpString "/n[Rust panicked at $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs:280:5]/n index out of bounds: the len is %u but the index is %u/n in main()/n" +%3 = OpString "/n[Rust panicked at $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs:276:5]/n index out of bounds: the len is %u but the index is %u/n in main()/n" %4 = OpString $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs" %5 = OpString "$DIR/panic_builtin_bounds_check.rs" OpDecorate %6 ArrayStride 4 @@ -42,7 +42,7 @@ OpBranchConditional %28 %30 %31 %30 = OpLabel OpBranch %29 %31 = OpLabel -OpLine %4 280 4 +OpLine %4 276 4 %32 = OpExtInst %7 %1 1 %3 %10 %18 OpNoLine OpReturn diff --git a/tests/compiletests/ui/dis/panic_sequential_many.stderr b/tests/compiletests/ui/dis/panic_sequential_many.stderr index ad3952f81b9..ffe854c6fe1 100644 --- a/tests/compiletests/ui/dis/panic_sequential_many.stderr +++ b/tests/compiletests/ui/dis/panic_sequential_many.stderr @@ -4,7 +4,7 @@ OpExtension "SPV_KHR_non_semantic_info" OpMemoryModel Logical Simple OpEntryPoint Fragment %2 "main" %3 %4 %5 OpExecutionMode %2 OriginUpperLeft -%6 = OpString "/n[Rust panicked at $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs:187:5]/n attempt to divide by zero/n in main()/n" +%6 = OpString "/n[Rust panicked at $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs:192:5]/n attempt to divide by zero/n in main()/n" %7 = OpString $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs" %8 = OpString "$DIR/panic_sequential_many.rs" OpName %3 "x" @@ -37,7 +37,7 @@ OpNoLine OpSelectionMerge %20 None OpBranchConditional %19 %21 %22 %21 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %23 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -51,7 +51,7 @@ OpNoLine OpSelectionMerge %26 None OpBranchConditional %25 %27 %28 %27 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %29 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -65,7 +65,7 @@ OpNoLine OpSelectionMerge %32 None OpBranchConditional %31 %33 %34 %33 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %35 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -79,7 +79,7 @@ OpNoLine OpSelectionMerge %38 None OpBranchConditional %37 %39 %40 %39 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %41 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -93,7 +93,7 @@ OpNoLine OpSelectionMerge %44 None OpBranchConditional %43 %45 %46 %45 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %47 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -107,7 +107,7 @@ OpNoLine OpSelectionMerge %50 None OpBranchConditional %49 %51 %52 %51 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %53 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -121,7 +121,7 @@ OpNoLine OpSelectionMerge %56 None OpBranchConditional %55 %57 %58 %57 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %59 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -135,7 +135,7 @@ OpNoLine OpSelectionMerge %62 None OpBranchConditional %61 %63 %64 %63 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %65 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -149,7 +149,7 @@ OpNoLine OpSelectionMerge %68 None OpBranchConditional %67 %69 %70 %69 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %71 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -163,7 +163,7 @@ OpNoLine OpSelectionMerge %74 None OpBranchConditional %73 %75 %76 %75 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %77 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -177,7 +177,7 @@ OpNoLine OpSelectionMerge %80 None OpBranchConditional %79 %81 %82 %81 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %83 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -191,7 +191,7 @@ OpNoLine OpSelectionMerge %86 None OpBranchConditional %85 %87 %88 %87 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %89 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -205,7 +205,7 @@ OpNoLine OpSelectionMerge %92 None OpBranchConditional %91 %93 %94 %93 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %95 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -219,7 +219,7 @@ OpNoLine OpSelectionMerge %98 None OpBranchConditional %97 %99 %100 %99 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %101 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -233,7 +233,7 @@ OpNoLine OpSelectionMerge %104 None OpBranchConditional %103 %105 %106 %105 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %107 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -247,7 +247,7 @@ OpNoLine OpSelectionMerge %110 None OpBranchConditional %109 %111 %112 %111 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %113 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn @@ -261,7 +261,7 @@ OpNoLine OpSelectionMerge %116 None OpBranchConditional %115 %117 %118 %117 = OpLabel -OpLine %7 187 4 +OpLine %7 192 4 %119 = OpExtInst %12 %1 1 %6 OpNoLine OpReturn diff --git a/tests/compiletests/ui/dis/ptr_read.stderr b/tests/compiletests/ui/dis/ptr_read.stderr index 356ab803936..9ddcc0dd96f 100644 --- a/tests/compiletests/ui/dis/ptr_read.stderr +++ b/tests/compiletests/ui/dis/ptr_read.stderr @@ -2,7 +2,7 @@ %4 = OpFunctionParameter %5 %6 = OpFunctionParameter %5 %7 = OpLabel -OpLine %8 1739 8 +OpLine %8 1744 8 %9 = OpLoad %10 %4 OpLine %11 7 13 OpStore %6 %9 diff --git a/tests/compiletests/ui/dis/ptr_read_method.stderr b/tests/compiletests/ui/dis/ptr_read_method.stderr index 356ab803936..9ddcc0dd96f 100644 --- a/tests/compiletests/ui/dis/ptr_read_method.stderr +++ b/tests/compiletests/ui/dis/ptr_read_method.stderr @@ -2,7 +2,7 @@ %4 = OpFunctionParameter %5 %6 = OpFunctionParameter %5 %7 = OpLabel -OpLine %8 1739 8 +OpLine %8 1744 8 %9 = OpLoad %10 %4 OpLine %11 7 13 OpStore %6 %9 diff --git a/tests/compiletests/ui/dis/ptr_write.stderr b/tests/compiletests/ui/dis/ptr_write.stderr index 6a82111894f..3b8503a01ca 100644 --- a/tests/compiletests/ui/dis/ptr_write.stderr +++ b/tests/compiletests/ui/dis/ptr_write.stderr @@ -4,7 +4,7 @@ %7 = OpLabel OpLine %8 7 35 %9 = OpLoad %10 %4 -OpLine %11 1939 8 +OpLine %11 1944 8 OpStore %6 %9 OpNoLine OpReturn diff --git a/tests/compiletests/ui/dis/ptr_write_method.stderr b/tests/compiletests/ui/dis/ptr_write_method.stderr index b882dca6703..c9dcea78f48 100644 --- a/tests/compiletests/ui/dis/ptr_write_method.stderr +++ b/tests/compiletests/ui/dis/ptr_write_method.stderr @@ -4,7 +4,7 @@ %7 = OpLabel OpLine %8 7 37 %9 = OpLoad %10 %4 -OpLine %11 1939 8 +OpLine %11 1944 8 OpStore %6 %9 OpNoLine OpReturn diff --git a/tests/compiletests/ui/image/gather_err.stderr b/tests/compiletests/ui/image/gather_err.stderr index 3bf82adcf39..966acd413fb 100644 --- a/tests/compiletests/ui/image/gather_err.stderr +++ b/tests/compiletests/ui/image/gather_err.stderr @@ -4,10 +4,35 @@ error[E0277]: the trait bound `Image: HasGather` is no LL | let r1: glam::Vec4 = image1d.gather(*sampler, 0.0f32, 0); | ^^^^^^ the trait `HasGather` is not implemented for `Image` | - = help: the following other types implement trait `HasGather`: - Image - Image - Image +help: the following other types implement trait `HasGather` + --> $SPIRV_STD_SRC/image.rs:1652:1 + | +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` note: required by a bound in `Image::::gather` --> $SPIRV_STD_SRC/image.rs:200:15 | @@ -23,10 +48,35 @@ error[E0277]: the trait bound `Image: HasGather` is no LL | let r2: glam::Vec4 = image3d.gather(*sampler, v3, 0); | ^^^^^^ the trait `HasGather` is not implemented for `Image` | - = help: the following other types implement trait `HasGather`: - Image - Image - Image +help: the following other types implement trait `HasGather` + --> $SPIRV_STD_SRC/image.rs:1652:1 + | +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` note: required by a bound in `Image::::gather` --> $SPIRV_STD_SRC/image.rs:200:15 | diff --git a/tests/compiletests/ui/image/query/query_levels_err.stderr b/tests/compiletests/ui/image/query/query_levels_err.stderr index b3efbe51d91..366003fbf31 100644 --- a/tests/compiletests/ui/image/query/query_levels_err.stderr +++ b/tests/compiletests/ui/image/query/query_levels_err.stderr @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image: HasQueryLevels` LL | *output = image.query_levels(); | ^^^^^^^^^^^^ the trait `HasQueryLevels` is not implemented for `Image` | - = help: the following other types implement trait `HasQueryLevels`: - Image - Image - Image - Image +help: the following other types implement trait `HasQueryLevels` + --> $SPIRV_STD_SRC/image.rs:1718:1 + | +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` note: required by a bound in `Image::::query_levels` --> $SPIRV_STD_SRC/image.rs:971:15 | diff --git a/tests/compiletests/ui/image/query/query_lod_err.stderr b/tests/compiletests/ui/image/query/query_lod_err.stderr index e9c9f5b1dc9..c82125f949e 100644 --- a/tests/compiletests/ui/image/query/query_lod_err.stderr +++ b/tests/compiletests/ui/image/query/query_lod_err.stderr @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image: HasQueryLevels` LL | *output = image.query_lod(*sampler, glam::Vec2::new(0.0, 1.0)); | ^^^^^^^^^ the trait `HasQueryLevels` is not implemented for `Image` | - = help: the following other types implement trait `HasQueryLevels`: - Image - Image - Image - Image +help: the following other types implement trait `HasQueryLevels` + --> $SPIRV_STD_SRC/image.rs:1718:1 + | +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` note: required by a bound in `Image::::query_lod` --> $SPIRV_STD_SRC/image.rs:1001:15 | diff --git a/tests/compiletests/ui/image/query/query_size_lod_err.stderr b/tests/compiletests/ui/image/query/query_size_lod_err.stderr index 1ffc4ed4456..2edffece1d1 100644 --- a/tests/compiletests/ui/image/query/query_size_lod_err.stderr +++ b/tests/compiletests/ui/image/query/query_size_lod_err.stderr @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image: HasQuerySizeLod` LL | *output = image.query_size_lod(0); | ^^^^^^^^^^^^^^ the trait `HasQuerySizeLod` is not implemented for `Image` | - = help: the following other types implement trait `HasQuerySizeLod`: - Image - Image - Image - Image +help: the following other types implement trait `HasQuerySizeLod` + --> $SPIRV_STD_SRC/image.rs:2089:1 + | +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` note: required by a bound in `Image::::query_size_lod` --> $SPIRV_STD_SRC/image.rs:1084:15 | diff --git a/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr b/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr index dbf8fa7b7d5..2f7faa12962 100644 --- a/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr +++ b/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image: HasQuerySizeLod` LL | *output = rect_sampled.query_size_lod(0); | ^^^^^^^^^^^^^^ the trait `HasQuerySizeLod` is not implemented for `Image` | - = help: the following other types implement trait `HasQuerySizeLod`: - Image - Image - Image - Image +help: the following other types implement trait `HasQuerySizeLod` + --> /image.rs:2089:1 + | +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` +... +LL | / impl< +LL | | SampledType: SampleType, +LL | | const DEPTH: u32, +LL | | const FORMAT: u32, +... | +LL | | COMPONENTS, +LL | | > + | |_____^ `Image` note: required by a bound in `SampledImage::>::query_size_lod` --> /image.rs:1253:12 | diff --git a/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr b/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr index cdd2c7b0b36..a498a6a77a3 100644 --- a/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr +++ b/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr @@ -1,15 +1,15 @@ -error: `noreturn` requires a terminator at the end - --> $DIR/block_tracking_fail.rs:11:15 - | -LL | asm!("", options(noreturn)); - | ^ - error: trailing terminator `OpUnreachable` requires `options(noreturn)` --> $DIR/block_tracking_fail.rs:18:15 | LL | asm!("OpUnreachable"); | ^^^^^^^^^^^^^ +error: `noreturn` requires a terminator at the end + --> $DIR/block_tracking_fail.rs:11:15 + | +LL | asm!("", options(noreturn)); + | ^ + error: expected `OpLabel` after terminator `OpKill` --> $DIR/block_tracking_fail.rs:26:14 | diff --git a/tests/compiletests/ui/lang/asm/issue-1002.stderr b/tests/compiletests/ui/lang/asm/issue-1002.stderr index 8b811d8ae93..974ce761ab7 100644 --- a/tests/compiletests/ui/lang/asm/issue-1002.stderr +++ b/tests/compiletests/ui/lang/asm/issue-1002.stderr @@ -6,14 +6,6 @@ LL | asm!("OpReturn", options(noreturn)); | = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior -error: using `OpReturnValue` to return from within `asm!` is disallowed - --> $DIR/issue-1002.rs:16:14 - | -LL | "OpReturnValue {x}", - | ^^^^^^^^^^^^^^^^^ - | - = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior - error: using `OpReturn` to return from within `asm!` is disallowed --> $DIR/issue-1002.rs:26:14 | @@ -22,6 +14,14 @@ LL | "OpReturn", // close active block | = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior +error: using `OpReturnValue` to return from within `asm!` is disallowed + --> $DIR/issue-1002.rs:16:14 + | +LL | "OpReturnValue {x}", + | ^^^^^^^^^^^^^^^^^ + | + = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior + error: using `OpReturnValue` to return from within `asm!` is disallowed --> $DIR/issue-1002.rs:35:14 | diff --git a/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr b/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr index 4b1883e4543..b2da8063b89 100644 --- a/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr +++ b/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr @@ -1,20 +1,3 @@ -error: constant arrays/structs cannot contain pointers to other constants - --> $DIR/nested-ref-in-composite.rs:20:17 - | -LL | *pair_out = pair_deep_load(&(&123, &3.14)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: used from within `nested_ref_in_composite::main_pair` - --> $DIR/nested-ref-in-composite.rs:20:17 - | -LL | *pair_out = pair_deep_load(&(&123, &3.14)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: called by `main_pair` - --> $DIR/nested-ref-in-composite.rs:19:8 - | -LL | pub fn main_pair(pair_out: &mut (u32, f32)) { - | ^^^^^^^^^ - error: constant arrays/structs cannot contain pointers to other constants --> $DIR/nested-ref-in-composite.rs:25:19 | @@ -32,5 +15,22 @@ note: called by `main_array3` LL | pub fn main_array3(array3_out: &mut [u32; 3]) { | ^^^^^^^^^^^ +error: constant arrays/structs cannot contain pointers to other constants + --> $DIR/nested-ref-in-composite.rs:20:17 + | +LL | *pair_out = pair_deep_load(&(&123, &3.14)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: used from within `nested_ref_in_composite::main_pair` + --> $DIR/nested-ref-in-composite.rs:20:17 + | +LL | *pair_out = pair_deep_load(&(&123, &3.14)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: called by `main_pair` + --> $DIR/nested-ref-in-composite.rs:19:8 + | +LL | pub fn main_pair(pair_out: &mut (u32, f32)) { + | ^^^^^^^^^ + error: aborting due to 2 previous errors diff --git a/tests/compiletests/ui/lang/core/intrinsics/black_box.stderr b/tests/compiletests/ui/lang/core/intrinsics/black_box.stderr index 192a37e3a3c..c5dfb04dea5 100644 --- a/tests/compiletests/ui/lang/core/intrinsics/black_box.stderr +++ b/tests/compiletests/ui/lang/core/intrinsics/black_box.stderr @@ -8,7 +8,7 @@ OpLine %5 41 19 %10 = OpIAdd %7 %11 %12 OpLine %5 47 8 %13 = OpBitcast %7 %14 -OpLine %15 1092 17 +OpLine %15 1103 17 %16 = OpBitcast %7 %17 OpLine %5 46 4 %18 = OpCompositeConstruct %2 %13 %16 %19 %20 %21 %22 %6 %23 %10 %24 %24 %24 diff --git a/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr b/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr index 4a41bfb462e..c46b2e0276e 100644 --- a/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr +++ b/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr @@ -36,6 +36,7 @@ LL | fn h_newtyped(xyz: ((&u32, &u32, &u32),)) -> (u32, u32, u32) { error: error:0:0 - OpLoad Pointer '$ID[%$ID]' is not a logical pointer. %39 = OpLoad %uint %38 + | = note: spirv-val failed = note: module `$TEST_BUILD_DIR/lang/core/ref/member_ref_arg-broken` diff --git a/tests/compiletests/ui/lang/core/unwrap_or.stderr b/tests/compiletests/ui/lang/core/unwrap_or.stderr index 56ecc9fb21a..a5bcc86afba 100644 --- a/tests/compiletests/ui/lang/core/unwrap_or.stderr +++ b/tests/compiletests/ui/lang/core/unwrap_or.stderr @@ -1,8 +1,8 @@ %1 = OpFunction %2 None %3 %4 = OpLabel -OpLine %5 1035 14 +OpLine %5 1041 14 %6 = OpBitcast %7 %8 -OpLine %5 1035 8 +OpLine %5 1041 8 %9 = OpINotEqual %10 %6 %11 OpNoLine OpSelectionMerge %12 None diff --git a/tests/compiletests/ui/lang/issue-452.stderr b/tests/compiletests/ui/lang/issue-452.stderr index adc228530a5..2f6b71f0427 100644 --- a/tests/compiletests/ui/lang/issue-452.stderr +++ b/tests/compiletests/ui/lang/issue-452.stderr @@ -4,35 +4,8 @@ error: function pointer types are not allowed LL | fn use_cmp(cmp: fn(&Position) -> u32) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: used by unnamed global (%10) -note: used from within `issue_452::use_cmp` - --> $DIR/issue-452.rs:8:4 - | -LL | fn use_cmp(cmp: fn(&Position) -> u32) { - | ^^^^^^^ -note: called by `issue_452::main` - --> $DIR/issue-452.rs:17:5 - | -LL | use_cmp(|p| p.0); - | ^^^^^^^^^^^^^^^^ -note: called by `main` - --> $DIR/issue-452.rs:16:8 - | -LL | pub fn main() { - | ^^^^ - -error: indirect calls are not supported in SPIR-V - --> $DIR/issue-452.rs:12:27 - | -LL | let _ = if cmp(&a) <= cmp(&b) { a } else { b }; - | ^^^^^^^ - | -note: used from within `issue_452::use_cmp` - --> $DIR/issue-452.rs:8:4 - | -LL | fn use_cmp(cmp: fn(&Position) -> u32) { - | ^^^^^^^ -note: called by `issue_452::main` + = note: used by unnamed global (%44) +note: used from within `issue_452::main` --> $DIR/issue-452.rs:17:5 | LL | use_cmp(|p| p.0); @@ -43,5 +16,5 @@ note: called by `main` LL | pub fn main() { | ^^^^ -error: aborting due to 2 previous errors +error: aborting due to 1 previous error diff --git a/tests/compiletests/ui/lang/panic/track_caller.stderr b/tests/compiletests/ui/lang/panic/track_caller.stderr deleted file mode 100644 index b18b2fed0d2..00000000000 --- a/tests/compiletests/ui/lang/panic/track_caller.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: `#[inline(never)]` function `track_caller::track_caller_maybe_panic::panic_cold_explicit` has been inlined - --> $DIR/track_caller.rs:10:9 - | -LL | panic!(); - | ^^^^^^^^ - | - = note: inlining was required due to panicking - = note: called from `track_caller::track_caller_maybe_panic` - -warning: 1 warning emitted - diff --git a/tests/compiletests/ui/spirv-attr/invalid-target.stderr b/tests/compiletests/ui/spirv-attr/invalid-target.stderr index e796b016564..4e5cb57615b 100644 --- a/tests/compiletests/ui/spirv-attr/invalid-target.stderr +++ b/tests/compiletests/ui/spirv-attr/invalid-target.stderr @@ -328,133 +328,133 @@ error: attribute is only valid on a function parameter, not on a foreign module LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ -error: attribute is only valid on a struct, not on a static item +error: attribute is only valid on a struct, not on a static --> $DIR/invalid-target.rs:96:5 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ -error: attribute is only valid on a struct, not on a static item +error: attribute is only valid on a struct, not on a static --> $DIR/invalid-target.rs:96:14 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ -error: attribute is only valid on a struct, not on a static item +error: attribute is only valid on a struct, not on a static --> $DIR/invalid-target.rs:96:21 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ -error: attribute is only valid on a struct, not on a static item +error: attribute is only valid on a struct, not on a static --> $DIR/invalid-target.rs:96:36 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function, not on a static item +error: attribute is only valid on a function, not on a static --> $DIR/invalid-target.rs:97:5 | LL | vertex, // fn-only | ^^^^^^ -error: attribute is only valid on a function parameter, not on a static item +error: attribute is only valid on a function parameter, not on a static --> $DIR/invalid-target.rs:98:5 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ -error: attribute is only valid on a function parameter, not on a static item +error: attribute is only valid on a function parameter, not on a static --> $DIR/invalid-target.rs:98:14 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ -error: attribute is only valid on a function parameter, not on a static item +error: attribute is only valid on a function parameter, not on a static --> $DIR/invalid-target.rs:98:24 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a static item +error: attribute is only valid on a function parameter, not on a static --> $DIR/invalid-target.rs:98:44 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a static item +error: attribute is only valid on a function parameter, not on a static --> $DIR/invalid-target.rs:98:57 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ -error: attribute is only valid on a function parameter, not on a static item +error: attribute is only valid on a function parameter, not on a static --> $DIR/invalid-target.rs:98:63 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ -error: attribute is only valid on a struct, not on a constant item +error: attribute is only valid on a struct, not on a constant --> $DIR/invalid-target.rs:103:5 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ -error: attribute is only valid on a struct, not on a constant item +error: attribute is only valid on a struct, not on a constant --> $DIR/invalid-target.rs:103:14 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ -error: attribute is only valid on a struct, not on a constant item +error: attribute is only valid on a struct, not on a constant --> $DIR/invalid-target.rs:103:21 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ -error: attribute is only valid on a struct, not on a constant item +error: attribute is only valid on a struct, not on a constant --> $DIR/invalid-target.rs:103:36 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function, not on a constant item +error: attribute is only valid on a function, not on a constant --> $DIR/invalid-target.rs:104:5 | LL | vertex, // fn-only | ^^^^^^ -error: attribute is only valid on a function parameter, not on a constant item +error: attribute is only valid on a function parameter, not on a constant --> $DIR/invalid-target.rs:105:5 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ -error: attribute is only valid on a function parameter, not on a constant item +error: attribute is only valid on a function parameter, not on a constant --> $DIR/invalid-target.rs:105:14 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ -error: attribute is only valid on a function parameter, not on a constant item +error: attribute is only valid on a function parameter, not on a constant --> $DIR/invalid-target.rs:105:24 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a constant item +error: attribute is only valid on a function parameter, not on a constant --> $DIR/invalid-target.rs:105:44 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a constant item +error: attribute is only valid on a function parameter, not on a constant --> $DIR/invalid-target.rs:105:57 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ -error: attribute is only valid on a function parameter, not on a constant item +error: attribute is only valid on a function parameter, not on a constant --> $DIR/invalid-target.rs:105:63 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -1030,67 +1030,67 @@ error: attribute is only valid on a function parameter, not on a struct field LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ -error: attribute is only valid on a struct, not on a inherent implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:176:5 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ -error: attribute is only valid on a struct, not on a inherent implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:176:14 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ -error: attribute is only valid on a struct, not on a inherent implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:176:21 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ -error: attribute is only valid on a struct, not on a inherent implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:176:36 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function, not on a inherent implementation block +error: attribute is only valid on a function, not on a implementation block --> $DIR/invalid-target.rs:177:5 | LL | vertex, // fn-only | ^^^^^^ -error: attribute is only valid on a function parameter, not on a inherent implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:178:5 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ -error: attribute is only valid on a function parameter, not on a inherent implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:178:14 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ -error: attribute is only valid on a function parameter, not on a inherent implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:178:24 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a inherent implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:178:44 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a inherent implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:178:57 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ -error: attribute is only valid on a function parameter, not on a inherent implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:178:63 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -1228,67 +1228,67 @@ error: attribute is only valid on a function parameter, not on a trait LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ -error: attribute is only valid on a struct, not on a trait implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:237:5 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ -error: attribute is only valid on a struct, not on a trait implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:237:14 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ -error: attribute is only valid on a struct, not on a trait implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:237:21 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ -error: attribute is only valid on a struct, not on a trait implementation block +error: attribute is only valid on a struct, not on a implementation block --> $DIR/invalid-target.rs:237:36 | LL | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function, not on a trait implementation block +error: attribute is only valid on a function, not on a implementation block --> $DIR/invalid-target.rs:238:5 | LL | vertex, // fn-only | ^^^^^^ -error: attribute is only valid on a function parameter, not on a trait implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:239:5 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ -error: attribute is only valid on a function parameter, not on a trait implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:239:14 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ -error: attribute is only valid on a function parameter, not on a trait implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:239:24 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a trait implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:239:44 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a trait implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:239:57 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ -error: attribute is only valid on a function parameter, not on a trait implementation block +error: attribute is only valid on a function parameter, not on a implementation block --> $DIR/invalid-target.rs:239:63 | LL | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only diff --git a/tests/compiletests/ui/spirv-attr/location_assignment/explicit_overlap.stderr b/tests/compiletests/ui/spirv-attr/location_assignment/explicit_overlap.stderr index dbde616b1c1..f67db73fd5f 100644 --- a/tests/compiletests/ui/spirv-attr/location_assignment/explicit_overlap.stderr +++ b/tests/compiletests/ui/spirv-attr/location_assignment/explicit_overlap.stderr @@ -43,6 +43,7 @@ OpReturn OpFunctionEnd error: error:0:0 - [VUID-StandaloneSpirv-OpEntryPoint-08722] Entry-point has conflicting output location assignment at location 1, component 0 OpEntryPoint Vertex %1 "main" %out1 %out2 + | = note: spirv-val failed = note: module ``