diff --git a/crates/rustc_codegen_spirv/src/abi.rs b/crates/rustc_codegen_spirv/src/abi.rs index 360158bf37..ae3c06c9e0 100644 --- a/crates/rustc_codegen_spirv/src/abi.rs +++ b/crates/rustc_codegen_spirv/src/abi.rs @@ -760,38 +760,6 @@ fn trans_intrinsic_type<'tcx>( intrinsic_type_attr: IntrinsicType, ) -> Result { match intrinsic_type_attr { - IntrinsicType::ImageType { - dim, - depth, - arrayed, - multisampled, - sampled, - image_format, - access_qualifier, - } => { - // see SpirvType::sizeof - if ty.size != Size::from_bytes(4) { - cx.tcx - .sess - .err("#[spirv(image_type)] type must have size 4"); - return Err(ErrorReported); - } - // Hardcode to float for now - let sampled_type = SpirvType::Float(32).def(span, cx); - - let ty = SpirvType::Image { - sampled_type, - dim, - depth, - arrayed, - multisampled, - sampled, - image_format, - access_qualifier, - }; - - Ok(ty.def(span, cx)) - } IntrinsicType::GenericImageType => { // see SpirvType::sizeof if ty.size != Size::from_bytes(4) { diff --git a/crates/rustc_codegen_spirv/src/attr.rs b/crates/rustc_codegen_spirv/src/attr.rs index af2a63dadb..4aee23dd56 100644 --- a/crates/rustc_codegen_spirv/src/attr.rs +++ b/crates/rustc_codegen_spirv/src/attr.rs @@ -4,9 +4,7 @@ use crate::codegen_cx::CodegenCx; use crate::symbols::Symbols; -use rspirv::spirv::{ - AccessQualifier, BuiltIn, Dim, ExecutionMode, ExecutionModel, ImageFormat, StorageClass, -}; +use rspirv::spirv::{BuiltIn, ExecutionMode, ExecutionModel, StorageClass}; use rustc_ast::Attribute; use rustc_hir as hir; use rustc_hir::def_id::LocalDefId; @@ -62,15 +60,6 @@ impl From for Entry { #[derive(Debug, Clone)] pub enum IntrinsicType { GenericImageType, - ImageType { - dim: Dim, - depth: u32, - arrayed: u32, - multisampled: u32, - sampled: u32, - image_format: ImageFormat, - access_qualifier: Option, - }, Sampler, AccelerationStructureKhr, SampledImage, diff --git a/crates/rustc_codegen_spirv/src/symbols.rs b/crates/rustc_codegen_spirv/src/symbols.rs index 94a447e97e..5f6d804012 100644 --- a/crates/rustc_codegen_spirv/src/symbols.rs +++ b/crates/rustc_codegen_spirv/src/symbols.rs @@ -24,14 +24,6 @@ pub struct Symbols { descriptor_set: Symbol, binding: Symbol, input_attachment_index: Symbol, - image_type: Symbol, - dim: Symbol, - depth: Symbol, - arrayed: Symbol, - multisampled: Symbol, - sampled: Symbol, - image_format: Symbol, - access_qualifier: Symbol, pub bindless: Symbol, attributes: FxHashMap, execution_modes: FxHashMap, @@ -382,14 +374,6 @@ impl Symbols { descriptor_set: Symbol::intern("descriptor_set"), binding: Symbol::intern("binding"), input_attachment_index: Symbol::intern("input_attachment_index"), - image_type: Symbol::intern("image_type"), - dim: Symbol::intern("dim"), - depth: Symbol::intern("depth"), - arrayed: Symbol::intern("arrayed"), - multisampled: Symbol::intern("multisampled"), - sampled: Symbol::intern("sampled"), - image_format: Symbol::intern("image_format"), - access_qualifier: Symbol::intern("access_qualifier"), bindless: Symbol::intern("bindless"), attributes, execution_modes, @@ -448,9 +432,7 @@ pub(crate) fn parse_attrs_for_checking<'a>( .into_iter() .chain(args.into_iter().map(move |ref arg| { let span = arg.span(); - let parsed_attr = if arg.has_name(sym.image_type) { - parse_image_type(sym, arg)? - } else if arg.has_name(sym.descriptor_set) { + let parsed_attr = if arg.has_name(sym.descriptor_set) { SpirvAttribute::DescriptorSet(parse_attr_int_value(arg)?) } else if arg.has_name(sym.binding) { SpirvAttribute::Binding(parse_attr_int_value(arg)?) @@ -487,113 +469,6 @@ pub(crate) fn parse_attrs_for_checking<'a>( }) } -fn parse_image_type( - sym: &Symbols, - attr: &NestedMetaItem, -) -> Result { - let args = match attr.meta_item_list() { - Some(args) => args, - None => { - return Err(( - attr.span(), - "image_type attribute must have arguments".to_string(), - )) - } - }; - if args.len() != 6 && args.len() != 7 { - return Err(( - attr.span(), - "image_type attribute must have 6 or 7 arguments".to_string(), - )); - } - let check = |idx: usize, sym: Symbol| -> Result<(), ParseAttrError> { - if args[idx].has_name(sym) { - Ok(()) - } else { - Err(( - args[idx].span(), - format!( - "image_type attribute argument {} must be {}=...", - idx + 1, - sym - ), - )) - } - }; - check(0, sym.dim)?; - check(1, sym.depth)?; - check(2, sym.arrayed)?; - check(3, sym.multisampled)?; - check(4, sym.sampled)?; - check(5, sym.image_format)?; - if args.len() == 7 { - check(6, sym.access_qualifier)?; - } - let arg_values = args - .iter() - .map( - |arg| match arg.meta_item().and_then(|arg| arg.name_value_literal()) { - Some(arg) => Ok(arg), - None => Err(( - arg.span(), - "image_type attribute must be name=value".to_string(), - )), - }, - ) - .collect::, _>>()?; - let dim = match arg_values[0].kind { - LitKind::Str(dim, _) => match dim.as_str().parse() { - Ok(dim) => dim, - Err(()) => return Err((args[0].span(), "invalid dim value".to_string())), - }, - _ => return Err((args[0].span(), "dim value must be str".to_string())), - }; - let parse_lit = |idx: usize, name: &str| -> Result { - match arg_values[idx].kind { - LitKind::Int(v, _) => Ok(v as u32), - _ => Err((args[idx].span(), format!("{} value must be int", name))), - } - }; - let depth = parse_lit(1, "depth")?; - let arrayed = parse_lit(2, "arrayed")?; - let multisampled = parse_lit(3, "multisampled")?; - let sampled = parse_lit(4, "sampled")?; - let image_format = match arg_values[5].kind { - LitKind::Str(image_format, _) => match image_format.as_str().parse() { - Ok(image_format) => image_format, - Err(()) => return Err((args[5].span(), "invalid image_format value".to_string())), - }, - _ => return Err((args[5].span(), "image_format value must be str".to_string())), - }; - let access_qualifier = if args.len() == 7 { - Some(match arg_values[6].kind { - LitKind::Str(access_qualifier, _) => match access_qualifier.as_str().parse() { - Ok(access_qualifier) => access_qualifier, - Err(()) => { - return Err((args[6].span(), "invalid access_qualifier value".to_string())); - } - }, - _ => { - return Err(( - args[6].span(), - "access_qualifier value must be str".to_string(), - )); - } - }) - } else { - None - }; - Ok(SpirvAttribute::IntrinsicType(IntrinsicType::ImageType { - dim, - depth, - arrayed, - multisampled, - sampled, - image_format, - access_qualifier, - })) -} - fn parse_attr_int_value(arg: &NestedMetaItem) -> Result { let arg = match arg.meta_item() { Some(arg) => arg, diff --git a/crates/spirv-std/Cargo.toml b/crates/spirv-std/Cargo.toml index 77bfd59140..0b6270de40 100644 --- a/crates/spirv-std/Cargo.toml +++ b/crates/spirv-std/Cargo.toml @@ -16,4 +16,3 @@ glam = { version = "0.15.2", default-features = false, features = ["libm"], opti [features] default = [] -const-generics = [] diff --git a/crates/spirv-std/src/arch.rs b/crates/spirv-std/src/arch.rs index 1783bdcf2d..30a3391a40 100644 --- a/crates/spirv-std/src/arch.rs +++ b/crates/spirv-std/src/arch.rs @@ -6,7 +6,6 @@ use crate::{scalar::Scalar, vector::Vector}; mod arithmetic; -#[cfg(feature = "const-generics")] mod barrier; mod demote_to_helper_invocation_ext; mod derivative; @@ -14,7 +13,6 @@ mod primitive; mod ray_tracing; pub use arithmetic::*; -#[cfg(feature = "const-generics")] pub use barrier::*; pub use demote_to_helper_invocation_ext::*; pub use derivative::*; diff --git a/crates/spirv-std/src/lib.rs b/crates/spirv-std/src/lib.rs index 158ffeae75..e86a19fffa 100644 --- a/crates/spirv-std/src/lib.rs +++ b/crates/spirv-std/src/lib.rs @@ -11,11 +11,7 @@ ), register_attr(spirv) )] -#![cfg_attr( - feature = "const-generics", - feature(const_generics), - allow(incomplete_features) -)] +#![feature(const_generics)] // BEGIN - Embark standard lints v0.3 // do not change or add/remove here, but one can add exceptions after this section // for more info see: @@ -85,7 +81,6 @@ pub extern crate spirv_std_macros as macros; pub mod arch; pub mod bindless; pub mod float; -#[cfg(feature = "const-generics")] pub mod image; pub mod integer; pub mod memory; @@ -94,14 +89,12 @@ mod runtime_array; mod sampler; pub mod scalar; pub(crate) mod sealed; -mod textures; pub mod vector; pub use self::sampler::Sampler; pub use crate::macros::Image; pub use num_traits; pub use runtime_array::*; -pub use textures::*; #[cfg(feature = "glam")] pub use glam; diff --git a/crates/spirv-std/src/textures.rs b/crates/spirv-std/src/textures.rs deleted file mode 100644 index 4ff525c5bd..0000000000 --- a/crates/spirv-std/src/textures.rs +++ /dev/null @@ -1,920 +0,0 @@ -use crate::{integer::Integer, vector::Vector}; - -pub use crate::sampler::Sampler; - -#[cfg_attr( - feature = "const-generics", - deprecated = "Legacy image type. Use `spirv_std::image::Image2d` instead." -)] -#[spirv(image_type( - // sampled_type is hardcoded to f32 for now - dim = "Dim2D", - depth = 0, - arrayed = 0, - multisampled = 0, - sampled = 1, - image_format = "Unknown" -))] -#[derive(Copy, Clone)] -pub struct Image2d { - _x: u32, -} - -#[allow(deprecated)] -impl Image2d { - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleImplicitLod")] - pub fn sample>( - &self, - sampler: Sampler, - coordinate: impl Vector, - ) -> V { - unsafe { - let mut result = Default::default(); - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleImplicitLod _ %sampledImage %coordinate", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - ); - result - } - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleExplicitLod")] - /// Sample the image at a coordinate by a lod - pub fn sample_by_lod>( - &self, - sampler: Sampler, - coordinate: impl Vector, - lod: f32, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleExplicitLod _ %sampledImage %coordinate Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - lod = in(reg) &lod - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleExplicitLod")] - /// Sample the image based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx], [du/dy, dv/dy]) - pub fn sample_by_gradient>( - &self, - sampler: Sampler, - coordinate: impl Vector, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleExplicitLod _ %sampledImage %coordinate Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleProjImplicitLod")] - pub fn sample_with_project_coordinate>( - &self, - sampler: Sampler, - project_coordinate: impl Vector, - ) -> V { - unsafe { - let mut result = Default::default(); - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%project_coordinate = OpLoad _ {project_coordinate}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleProjImplicitLod _ %sampledImage %project_coordinate", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - project_coordinate = in(reg) &project_coordinate, - ); - result - } - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleProjExplicitLod")] - /// Sample the image with a project coordinate by a lod - pub fn sample_with_project_coordinate_by_lod>( - &self, - sampler: Sampler, - project_coordinate: impl Vector, - lod: f32, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%project_coordinate = OpLoad _ {project_coordinate}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleProjExplicitLod _ %sampledImage %project_coordinate Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - project_coordinate = in(reg) &project_coordinate, - lod = in(reg) &lod - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleProjExplicitLod")] - /// Sample the image with a project coordinate based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx], [du/dy, dv/dy]) - pub fn sample_with_project_coordinate_by_gradient>( - &self, - sampler: Sampler, - project_coordinate: impl Vector, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%project_coordinate = OpLoad _ {project_coordinate}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleProjExplicitLod _ %sampledImage %project_coordinate Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - project_coordinate = in(reg) &project_coordinate, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefImplicitLod")] - /// Sample the image's depth reference - pub fn sample_depth_reference( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", // not required to do this way, but done for consistency - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefImplicitLod _ %sampledImage %coordinate %depth_reference", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefExplicitLod")] - /// Sample the image's depth reference based on an explicit lod - pub fn sample_depth_reference_by_lod( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - lod: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefExplicitLod _ %sampledImage %coordinate %depth_reference Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - lod = in(reg) &lod, - ) - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefExplicitLod")] - /// Sample the image's depth reference based on a gradient formed by (dx, dy). - /// Specifically, ([du/dx, dv/dx], [du/dy, dv/dy]) - pub fn sample_depth_reference_by_gradient( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefExplicitLod _ %sampledImage %coordinate %depth_reference Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleProjDrefImplicitLod")] - /// Sample the image's depth reference with the project coordinate - pub fn sample_depth_reference_with_project_coordinate( - &self, - sampler: Sampler, - project_coordinate: impl Vector, - depth_reference: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%project_coordinate = OpLoad _ {project_coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", // not required to do this way, but done for consistency - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleProjDrefImplicitLod _ %sampledImage %project_coordinate %depth_reference", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - project_coordinate = in(reg) &project_coordinate, - depth_reference = in(reg) &depth_reference, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleProjDrefExplicitLod")] - /// Sample the image's depth reference with the project coordinate based on an explicit lod - pub fn sample_depth_reference_with_project_coordinate_by_lod( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - lod: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleProjDrefExplicitLod _ %sampledImage %coordinate %depth_reference Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - lod = in(reg) &lod, - ) - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleProjDrefExplicitLod")] - /// Sample the image's depth reference with the project coordinate based on a gradient formed by (dx, dy). - /// Specifically, ([du/dx, dv/dx], [du/dy, dv/dy]) - pub fn sample_depth_reference_with_project_coordinate_by_gradient( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleProjDrefExplicitLod _ %sampledImage %coordinate %depth_reference Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } - - /// Fetch a single texel with a sampler set at compile time - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageFetch")] - pub fn fetch(&self, coordinate: impl Vector) -> V - where - V: Vector, - I: Integer, - { - let mut result = V::default(); - unsafe { - asm! { - "%image = OpLoad _ {this}", - "%coordinate = OpLoad _ {coordinate}", - "%result = OpImageFetch typeof*{result} %image %coordinate", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - coordinate = in(reg) &coordinate, - } - } - - result - } -} - -#[cfg_attr( - feature = "const-generics", - deprecated = "Legacy image type. Use `spirv_std::image::StorageImage2d` instead." -)] -#[spirv(image_type( - // sampled_type is hardcoded to f32 for now - dim = "Dim2D", - depth = 0, - arrayed = 0, - multisampled = 0, - sampled = 2, - image_format = "Unknown" -))] -#[derive(Copy, Clone)] -pub struct StorageImage2d { - _x: u32, -} - -#[allow(deprecated)] -impl StorageImage2d { - /// Read a texel from an image without a sampler. - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageRead")] - pub fn read(&self, coordinate: impl Vector) -> V - where - I: Integer, - V: Vector, - { - let mut result = V::default(); - - unsafe { - asm! { - "%image = OpLoad _ {this}", - "%coordinate = OpLoad _ {coordinate}", - "%result = OpImageRead typeof*{result} %image %coordinate", - "OpStore {result} %result", - this = in(reg) self, - coordinate = in(reg) &coordinate, - result = in(reg) &mut result, - } - } - - result - } - - /// Write a texel to an image without a sampler. - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageWrite")] - pub unsafe fn write( - &self, - coordinate: impl Vector, - texels: impl Vector, - ) where - I: Integer, - { - asm! { - "%image = OpLoad _ {this}", - "%coordinate = OpLoad _ {coordinate}", - "%texels = OpLoad _ {texels}", - "OpImageWrite %image %coordinate %texels", - this = in(reg) self, - coordinate = in(reg) &coordinate, - texels = in(reg) &texels, - } - } -} - -#[cfg_attr( - feature = "const-generics", - deprecated = "Legacy image type. Use `spirv_std::image::Image2dArray` instead." -)] -#[spirv(image_type( - // sampled_type is hardcoded to f32 for now - dim = "Dim2D", - depth = 0, - arrayed = 1, - multisampled = 0, - sampled = 1, - image_format = "Unknown" -))] -#[derive(Copy, Clone)] -pub struct Image2dArray { - _x: u32, -} - -#[allow(deprecated)] -impl Image2dArray { - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleImplicitLod")] - pub fn sample>( - &self, - sampler: Sampler, - coordinate: impl Vector, - ) -> V { - unsafe { - let mut result = V::default(); - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleImplicitLod _ %sampledImage %coordinate", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - ); - result - } - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleExplicitLod")] - /// Sample the image at a coordinate by a lod - pub fn sample_by_lod>( - &self, - sampler: Sampler, - coordinate: impl Vector, - lod: f32, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleExplicitLod _ %sampledImage %coordinate Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - lod = in(reg) &lod - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleExplicitLod")] - /// Sample the image based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx], [du/dy, dv/dy]) - pub fn sample_by_gradient>( - &self, - sampler: Sampler, - coordinate: impl Vector, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleExplicitLod _ %sampledImage %coordinate Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefImplicitLod")] - /// Sample the image's depth reference - pub fn sample_depth_reference( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", // not required to do this way, but done for consistency - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefImplicitLod _ %sampledImage %coordinate %depth_reference", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefExplicitLod")] - /// Sample the image's depth reference based on an explicit lod - pub fn sample_depth_reference_by_lod( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - lod: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefExplicitLod _ %sampledImage %coordinate %depth_reference Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - lod = in(reg) &lod, - ) - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefExplicitLod")] - /// Sample the image's depth reference based on a gradient formed by (dx, dy). - /// Specifically, ([du/dx, dv/dx], [du/dy, dv/dy]) - pub fn sample_depth_reference_by_gradient( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefExplicitLod _ %sampledImage %coordinate %depth_reference Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } -} - -#[cfg_attr( - feature = "const-generics", - deprecated = "Legacy image type. Use `spirv_std::image::Cubemap` instead." -)] -#[spirv(image_type( - // sampled_type is hardcoded to f32 for now - dim = "DimCube", - depth = 0, - arrayed = 0, - multisampled = 0, - sampled = 1, - image_format = "Unknown" -))] -#[derive(Copy, Clone)] -pub struct Cubemap { - _x: u32, -} - -#[allow(deprecated)] -impl Cubemap { - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpSampledImage")] - pub fn sample>( - &self, - sampler: Sampler, - coordinate: impl Vector, - ) -> V { - unsafe { - let mut result = Default::default(); - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleImplicitLod _ %sampledImage %coordinate", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - ); - result - } - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleExplicitLod")] - /// Sample the image at a coordinate by a lod - pub fn sample_by_lod>( - &self, - sampler: Sampler, - coordinate: impl Vector, - lod: f32, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleExplicitLod _ %sampledImage %coordinate Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - lod = in(reg) &lod - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleExplicitLod")] - /// Sample the image based on a gradient formed by (dx, dy). Specifically, ([du/dx, dv/dx, dw/dx], [du/dy, dv/dy, dw/dy]) - pub fn sample_by_gradient>( - &self, - sampler: Sampler, - coordinate: impl Vector, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> V { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleExplicitLod _ %sampledImage %coordinate Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefImplicitLod")] - /// Sample the image's depth reference - pub fn sample_depth_reference( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", // not required to do this way, but done for consistency - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefImplicitLod _ %sampledImage %coordinate %depth_reference", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - ); - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefExplicitLod")] - /// Sample the image's depth reference based on an explicit lod - pub fn sample_depth_reference_by_lod( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - lod: f32, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%lod = OpLoad _ {lod}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefExplicitLod _ %sampledImage %coordinate %depth_reference Lod %lod", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - lod = in(reg) &lod, - ) - } - result - } - - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleDrefExplicitLod")] - /// Sample the image's depth reference based on a gradient formed by (dx, dy). - /// Specifically, ([du/dx, dv/dx, dw/dx], [du/dy, dv/dy, dw/dy]) - pub fn sample_depth_reference_by_gradient( - &self, - sampler: Sampler, - coordinate: impl Vector, - depth_reference: f32, - gradient_dx: impl Vector, - gradient_dy: impl Vector, - ) -> f32 { - let mut result = Default::default(); - unsafe { - asm!( - "%image = OpLoad _ {this}", - "%sampler = OpLoad _ {sampler}", - "%coordinate = OpLoad _ {coordinate}", - "%depth_reference = OpLoad _ {depth_reference}", - "%gradient_dx = OpLoad _ {gradient_dx}", - "%gradient_dy = OpLoad _ {gradient_dy}", - "%sampledImage = OpSampledImage _ %image %sampler", - "%result = OpImageSampleDrefExplicitLod _ %sampledImage %coordinate %depth_reference Grad %gradient_dx %gradient_dy", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - sampler = in(reg) &sampler, - coordinate = in(reg) &coordinate, - depth_reference = in(reg) &depth_reference, - gradient_dx = in(reg) &gradient_dx, - gradient_dy = in(reg) &gradient_dy, - ); - } - result - } -} - -#[cfg_attr( - feature = "const-generics", - deprecated = "Legacy image type. Use `spirv_std::image::SampledImage` instead." -)] -#[spirv(sampled_image)] -#[derive(Copy, Clone)] -pub struct SampledImage { - _image: I, -} - -#[allow(deprecated)] -impl SampledImage { - #[spirv_std_macros::gpu_only] - #[doc(alias = "OpImageSampleImplicitLod")] - pub fn sample>(&self, coordinate: impl Vector) -> V { - unsafe { - let mut result = Default::default(); - asm!( - "%sampledImage = OpLoad _ {this}", - "%coordinate = OpLoad _ {coordinate}", - "%result = OpImageSampleImplicitLod _ %sampledImage %coordinate", - "OpStore {result} %result", - result = in(reg) &mut result, - this = in(reg) self, - coordinate = in(reg) &coordinate - ); - result - } - } -} diff --git a/docs/src/image.md b/docs/src/image.md index 49f805450e..410601041e 100644 --- a/docs/src/image.md +++ b/docs/src/image.md @@ -16,11 +16,3 @@ and is likely what you want if you want a regular old sampled texture. ```rust,no_run type Image2d = Image!(2D, type=f32, sampled); ``` - -Note that the `const-generics` cargo feature in spirv-std must be enabled to use the `Image!` macro -at the moment. This will likely change in the near future. - -```toml -[dependencies] -spirv-std = { ..., features = ["const-generics"] } -``` diff --git a/tests/deps-helper/Cargo.toml b/tests/deps-helper/Cargo.toml index 4996d3c44a..57914a9108 100644 --- a/tests/deps-helper/Cargo.toml +++ b/tests/deps-helper/Cargo.toml @@ -8,4 +8,4 @@ license = "MIT OR Apache-2.0" publish = false [dependencies] -spirv-std = { path = "../../crates/spirv-std", features = ["const-generics", "glam"] } +spirv-std = { path = "../../crates/spirv-std", features = ["glam"] } diff --git a/tests/ui/spirv-attr/invalid-target.rs b/tests/ui/spirv-attr/invalid-target.rs index dceae1dd28..d6645b3235 100644 --- a/tests/ui/spirv-attr/invalid-target.rs +++ b/tests/ui/spirv-attr/invalid-target.rs @@ -31,8 +31,7 @@ // * 1 on `_closure` #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -42,8 +41,7 @@ macro_rules! _macro { } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -51,8 +49,7 @@ macro_rules! _macro { extern crate spirv_std as _; #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -60,8 +57,7 @@ extern crate spirv_std as _; use spirv_std as _; #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -69,16 +65,14 @@ use spirv_std as _; mod _mod {} #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] extern "C" { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -86,8 +80,7 @@ extern "C" { type _ForeignTy; #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -95,8 +88,7 @@ extern "C" { static _FOREIGN_STATIC: (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -105,8 +97,7 @@ extern "C" { } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -114,8 +105,7 @@ extern "C" { static _STATIC: () = (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -123,8 +113,7 @@ static _STATIC: () = (); const _CONST: () = (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -132,8 +121,7 @@ const _CONST: () = (); type _TyAlias = (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -145,24 +133,21 @@ fn _opaque_ty_definer() -> _OpaqueTy { } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] enum _Enum { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] _Variant { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -172,16 +157,14 @@ enum _Enum { } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] union _Union { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -196,8 +179,7 @@ union _Union { )] struct _Struct { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -206,16 +188,14 @@ struct _Struct { } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] impl _Struct { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -223,16 +203,14 @@ impl _Struct { const _INHERENT_ASSOC_CONST: () = (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _inherent_method() {} } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -240,16 +218,14 @@ impl _Struct { trait _TraitAlias = Copy; #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] trait _Trait { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -257,8 +233,7 @@ trait _Trait { type _AssocTy; #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -266,8 +241,7 @@ trait _Trait { const _TRAIT_ASSOC_CONST: (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -275,24 +249,21 @@ trait _Trait { fn _trait_method(); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _trait_method_with_default() {} } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] impl _Trait for () { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -300,8 +271,7 @@ impl _Trait for () { type _AssocTy = (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -309,30 +279,26 @@ impl _Trait for () { const _TRAIT_ASSOC_CONST: () = (); #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _trait_method() {} } #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _fn( #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only unroll_loops, // fn/closure-only )] _entry_param: (), ) { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -340,8 +306,7 @@ fn _fn( let _statement = (); let _closure = #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] @@ -349,8 +314,7 @@ fn _fn( ( #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -360,8 +324,7 @@ fn _fn( match () { #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only @@ -372,22 +335,19 @@ fn _fn( fn _fn_with_generics< #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] '_lifetime_param, #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only )] _TyParam, #[spirv( - sampler, block, sampled_image, // struct-only (incl. `image_type`) - image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only unroll_loops, // fn/closure-only diff --git a/tests/ui/spirv-attr/invalid-target.stderr b/tests/ui/spirv-attr/invalid-target.stderr index 49401c0042..d78825e36f 100644 --- a/tests/ui/spirv-attr/invalid-target.stderr +++ b/tests/ui/spirv-attr/invalid-target.stderr @@ -1,2779 +1,2778 @@ error: attribute is only valid on a struct, not on a lifetime parameter - --> $DIR/invalid-target.rs:375:9 + --> $DIR/invalid-target.rs:338:9 | -375 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +338 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a lifetime parameter - --> $DIR/invalid-target.rs:375:18 + --> $DIR/invalid-target.rs:338:18 | -375 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +338 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a lifetime parameter - --> $DIR/invalid-target.rs:375:25 + --> $DIR/invalid-target.rs:338:25 | -375 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +338 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a lifetime parameter - --> $DIR/invalid-target.rs:376:9 + --> $DIR/invalid-target.rs:338:40 | -376 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +338 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a lifetime parameter - --> $DIR/invalid-target.rs:377:9 + --> $DIR/invalid-target.rs:339:9 | -377 | vertex, // fn-only +339 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a lifetime parameter - --> $DIR/invalid-target.rs:378:9 + --> $DIR/invalid-target.rs:340:9 | -378 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a lifetime parameter - --> $DIR/invalid-target.rs:378:18 + --> $DIR/invalid-target.rs:340:18 | -378 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a lifetime parameter - --> $DIR/invalid-target.rs:378:28 + --> $DIR/invalid-target.rs:340:28 | -378 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a lifetime parameter - --> $DIR/invalid-target.rs:378:48 + --> $DIR/invalid-target.rs:340:48 | -378 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a lifetime parameter - --> $DIR/invalid-target.rs:378:61 + --> $DIR/invalid-target.rs:340:61 | -378 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a lifetime parameter - --> $DIR/invalid-target.rs:378:67 + --> $DIR/invalid-target.rs:340:67 | -378 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a lifetime parameter - --> $DIR/invalid-target.rs:379:9 + --> $DIR/invalid-target.rs:341:9 | -379 | unroll_loops, // fn/closure-only +341 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a type parameter - --> $DIR/invalid-target.rs:382:9 + --> $DIR/invalid-target.rs:344:9 | -382 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +344 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a type parameter - --> $DIR/invalid-target.rs:382:18 + --> $DIR/invalid-target.rs:344:18 | -382 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +344 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a type parameter - --> $DIR/invalid-target.rs:382:25 + --> $DIR/invalid-target.rs:344:25 | -382 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +344 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a type parameter - --> $DIR/invalid-target.rs:383:9 + --> $DIR/invalid-target.rs:344:40 | -383 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +344 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a type parameter - --> $DIR/invalid-target.rs:384:9 + --> $DIR/invalid-target.rs:345:9 | -384 | vertex, // fn-only +345 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a type parameter - --> $DIR/invalid-target.rs:385:9 + --> $DIR/invalid-target.rs:346:9 | -385 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a type parameter - --> $DIR/invalid-target.rs:385:18 + --> $DIR/invalid-target.rs:346:18 | -385 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a type parameter - --> $DIR/invalid-target.rs:385:28 + --> $DIR/invalid-target.rs:346:28 | -385 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a type parameter - --> $DIR/invalid-target.rs:385:48 + --> $DIR/invalid-target.rs:346:48 | -385 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a type parameter - --> $DIR/invalid-target.rs:385:61 + --> $DIR/invalid-target.rs:346:61 | -385 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a type parameter - --> $DIR/invalid-target.rs:385:67 + --> $DIR/invalid-target.rs:346:67 | -385 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a type parameter - --> $DIR/invalid-target.rs:386:9 + --> $DIR/invalid-target.rs:347:9 | -386 | unroll_loops, // fn/closure-only +347 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a const parameter - --> $DIR/invalid-target.rs:389:9 + --> $DIR/invalid-target.rs:350:9 | -389 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +350 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a const parameter - --> $DIR/invalid-target.rs:389:18 + --> $DIR/invalid-target.rs:350:18 | -389 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +350 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a const parameter - --> $DIR/invalid-target.rs:389:25 + --> $DIR/invalid-target.rs:350:25 | -389 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +350 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a const parameter - --> $DIR/invalid-target.rs:390:9 + --> $DIR/invalid-target.rs:350:40 | -390 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +350 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a const parameter - --> $DIR/invalid-target.rs:391:9 + --> $DIR/invalid-target.rs:351:9 | -391 | vertex, // fn-only +351 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a const parameter - --> $DIR/invalid-target.rs:392:9 + --> $DIR/invalid-target.rs:352:9 | -392 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a const parameter - --> $DIR/invalid-target.rs:392:18 + --> $DIR/invalid-target.rs:352:18 | -392 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a const parameter - --> $DIR/invalid-target.rs:392:28 + --> $DIR/invalid-target.rs:352:28 | -392 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a const parameter - --> $DIR/invalid-target.rs:392:48 + --> $DIR/invalid-target.rs:352:48 | -392 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a const parameter - --> $DIR/invalid-target.rs:392:61 + --> $DIR/invalid-target.rs:352:61 | -392 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a const parameter - --> $DIR/invalid-target.rs:392:67 + --> $DIR/invalid-target.rs:352:67 | -392 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a const parameter - --> $DIR/invalid-target.rs:393:9 + --> $DIR/invalid-target.rs:353:9 | -393 | unroll_loops, // fn/closure-only +353 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a extern crate - --> $DIR/invalid-target.rs:45:5 + --> $DIR/invalid-target.rs:44:5 | -45 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +44 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a extern crate - --> $DIR/invalid-target.rs:45:14 + --> $DIR/invalid-target.rs:44:14 | -45 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +44 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a extern crate - --> $DIR/invalid-target.rs:45:21 + --> $DIR/invalid-target.rs:44:21 | -45 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +44 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a extern crate - --> $DIR/invalid-target.rs:46:5 + --> $DIR/invalid-target.rs:44:36 | -46 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +44 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a extern crate - --> $DIR/invalid-target.rs:47:5 + --> $DIR/invalid-target.rs:45:5 | -47 | vertex, // fn-only +45 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a extern crate - --> $DIR/invalid-target.rs:48:5 + --> $DIR/invalid-target.rs:46:5 | -48 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a extern crate - --> $DIR/invalid-target.rs:48:14 + --> $DIR/invalid-target.rs:46:14 | -48 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a extern crate - --> $DIR/invalid-target.rs:48:24 + --> $DIR/invalid-target.rs:46:24 | -48 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a extern crate - --> $DIR/invalid-target.rs:48:44 + --> $DIR/invalid-target.rs:46:44 | -48 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a extern crate - --> $DIR/invalid-target.rs:48:57 + --> $DIR/invalid-target.rs:46:57 | -48 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a extern crate - --> $DIR/invalid-target.rs:48:63 + --> $DIR/invalid-target.rs:46:63 | -48 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a extern crate - --> $DIR/invalid-target.rs:49:5 + --> $DIR/invalid-target.rs:47:5 | -49 | unroll_loops, // fn/closure-only +47 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a use - --> $DIR/invalid-target.rs:54:5 + --> $DIR/invalid-target.rs:52:5 | -54 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +52 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a use - --> $DIR/invalid-target.rs:54:14 + --> $DIR/invalid-target.rs:52:14 | -54 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +52 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a use - --> $DIR/invalid-target.rs:54:21 + --> $DIR/invalid-target.rs:52:21 | -54 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +52 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a use - --> $DIR/invalid-target.rs:55:5 + --> $DIR/invalid-target.rs:52:36 | -55 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +52 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a use - --> $DIR/invalid-target.rs:56:5 + --> $DIR/invalid-target.rs:53:5 | -56 | vertex, // fn-only +53 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a use - --> $DIR/invalid-target.rs:57:5 + --> $DIR/invalid-target.rs:54:5 | -57 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +54 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a use - --> $DIR/invalid-target.rs:57:14 + --> $DIR/invalid-target.rs:54:14 | -57 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +54 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a use - --> $DIR/invalid-target.rs:57:24 + --> $DIR/invalid-target.rs:54:24 | -57 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +54 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a use - --> $DIR/invalid-target.rs:57:44 + --> $DIR/invalid-target.rs:54:44 | -57 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +54 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a use - --> $DIR/invalid-target.rs:57:57 + --> $DIR/invalid-target.rs:54:57 | -57 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +54 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a use - --> $DIR/invalid-target.rs:57:63 + --> $DIR/invalid-target.rs:54:63 | -57 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +54 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a use - --> $DIR/invalid-target.rs:58:5 + --> $DIR/invalid-target.rs:55:5 | -58 | unroll_loops, // fn/closure-only +55 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a module - --> $DIR/invalid-target.rs:63:5 + --> $DIR/invalid-target.rs:60:5 | -63 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +60 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a module - --> $DIR/invalid-target.rs:63:14 + --> $DIR/invalid-target.rs:60:14 | -63 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +60 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a module - --> $DIR/invalid-target.rs:63:21 + --> $DIR/invalid-target.rs:60:21 | -63 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +60 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a module - --> $DIR/invalid-target.rs:64:5 + --> $DIR/invalid-target.rs:60:36 | -64 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +60 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a module - --> $DIR/invalid-target.rs:65:5 + --> $DIR/invalid-target.rs:61:5 | -65 | vertex, // fn-only +61 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a module - --> $DIR/invalid-target.rs:66:5 + --> $DIR/invalid-target.rs:62:5 | -66 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +62 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a module - --> $DIR/invalid-target.rs:66:14 + --> $DIR/invalid-target.rs:62:14 | -66 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +62 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a module - --> $DIR/invalid-target.rs:66:24 + --> $DIR/invalid-target.rs:62:24 | -66 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +62 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a module - --> $DIR/invalid-target.rs:66:44 + --> $DIR/invalid-target.rs:62:44 | -66 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +62 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a module - --> $DIR/invalid-target.rs:66:57 + --> $DIR/invalid-target.rs:62:57 | -66 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +62 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a module - --> $DIR/invalid-target.rs:66:63 + --> $DIR/invalid-target.rs:62:63 | -66 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +62 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a module - --> $DIR/invalid-target.rs:67:5 + --> $DIR/invalid-target.rs:63:5 | -67 | unroll_loops, // fn/closure-only +63 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign module - --> $DIR/invalid-target.rs:72:5 + --> $DIR/invalid-target.rs:68:5 | -72 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +68 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a foreign module - --> $DIR/invalid-target.rs:72:14 + --> $DIR/invalid-target.rs:68:14 | -72 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +68 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a foreign module - --> $DIR/invalid-target.rs:72:21 + --> $DIR/invalid-target.rs:68:21 | -72 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +68 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign module - --> $DIR/invalid-target.rs:73:5 + --> $DIR/invalid-target.rs:68:36 | -73 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +68 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a foreign module - --> $DIR/invalid-target.rs:74:5 + --> $DIR/invalid-target.rs:69:5 | -74 | vertex, // fn-only +69 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a foreign module - --> $DIR/invalid-target.rs:75:5 + --> $DIR/invalid-target.rs:70:5 | -75 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +70 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign module - --> $DIR/invalid-target.rs:75:14 + --> $DIR/invalid-target.rs:70:14 | -75 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +70 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign module - --> $DIR/invalid-target.rs:75:24 + --> $DIR/invalid-target.rs:70:24 | -75 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +70 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign module - --> $DIR/invalid-target.rs:75:44 + --> $DIR/invalid-target.rs:70:44 | -75 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +70 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign module - --> $DIR/invalid-target.rs:75:57 + --> $DIR/invalid-target.rs:70:57 | -75 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +70 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a foreign module - --> $DIR/invalid-target.rs:75:63 + --> $DIR/invalid-target.rs:70:63 | -75 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +70 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a foreign module - --> $DIR/invalid-target.rs:76:5 + --> $DIR/invalid-target.rs:71:5 | -76 | unroll_loops, // fn/closure-only +71 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a static item - --> $DIR/invalid-target.rs:108:5 + --> $DIR/invalid-target.rs:100:5 | -108 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +100 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a static item - --> $DIR/invalid-target.rs:108:14 + --> $DIR/invalid-target.rs:100:14 | -108 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +100 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a static item - --> $DIR/invalid-target.rs:108:21 + --> $DIR/invalid-target.rs:100:21 | -108 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +100 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a static item - --> $DIR/invalid-target.rs:109:5 + --> $DIR/invalid-target.rs:100:36 | -109 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +100 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a static item - --> $DIR/invalid-target.rs:110:5 + --> $DIR/invalid-target.rs:101:5 | -110 | vertex, // fn-only +101 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a static item - --> $DIR/invalid-target.rs:111:5 + --> $DIR/invalid-target.rs:102:5 | -111 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +102 | 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 - --> $DIR/invalid-target.rs:111:14 + --> $DIR/invalid-target.rs:102:14 | -111 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +102 | 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 - --> $DIR/invalid-target.rs:111:24 + --> $DIR/invalid-target.rs:102:24 | -111 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +102 | 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 - --> $DIR/invalid-target.rs:111:44 + --> $DIR/invalid-target.rs:102:44 | -111 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +102 | 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 - --> $DIR/invalid-target.rs:111:57 + --> $DIR/invalid-target.rs:102:57 | -111 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +102 | 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 - --> $DIR/invalid-target.rs:111:63 + --> $DIR/invalid-target.rs:102:63 | -111 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +102 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a static item - --> $DIR/invalid-target.rs:112:5 + --> $DIR/invalid-target.rs:103:5 | -112 | unroll_loops, // fn/closure-only +103 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a constant item - --> $DIR/invalid-target.rs:117:5 + --> $DIR/invalid-target.rs:108:5 | -117 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +108 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a constant item - --> $DIR/invalid-target.rs:117:14 + --> $DIR/invalid-target.rs:108:14 | -117 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +108 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a constant item - --> $DIR/invalid-target.rs:117:21 + --> $DIR/invalid-target.rs:108:21 | -117 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +108 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a constant item - --> $DIR/invalid-target.rs:118:5 + --> $DIR/invalid-target.rs:108:36 | -118 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +108 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a constant item - --> $DIR/invalid-target.rs:119:5 + --> $DIR/invalid-target.rs:109:5 | -119 | vertex, // fn-only +109 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a constant item - --> $DIR/invalid-target.rs:120:5 + --> $DIR/invalid-target.rs:110:5 | -120 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +110 | 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 - --> $DIR/invalid-target.rs:120:14 + --> $DIR/invalid-target.rs:110:14 | -120 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +110 | 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 - --> $DIR/invalid-target.rs:120:24 + --> $DIR/invalid-target.rs:110:24 | -120 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +110 | 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 - --> $DIR/invalid-target.rs:120:44 + --> $DIR/invalid-target.rs:110:44 | -120 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +110 | 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 - --> $DIR/invalid-target.rs:120:57 + --> $DIR/invalid-target.rs:110:57 | -120 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +110 | 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 - --> $DIR/invalid-target.rs:120:63 + --> $DIR/invalid-target.rs:110:63 | -120 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +110 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a constant item - --> $DIR/invalid-target.rs:121:5 + --> $DIR/invalid-target.rs:111:5 | -121 | unroll_loops, // fn/closure-only +111 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:126:5 + --> $DIR/invalid-target.rs:116:5 | -126 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +116 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:126:14 + --> $DIR/invalid-target.rs:116:14 | -126 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +116 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:126:21 + --> $DIR/invalid-target.rs:116:21 | -126 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +116 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:127:5 + --> $DIR/invalid-target.rs:116:36 | -127 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +116 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a type alias - --> $DIR/invalid-target.rs:128:5 + --> $DIR/invalid-target.rs:117:5 | -128 | vertex, // fn-only +117 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:129:5 + --> $DIR/invalid-target.rs:118:5 | -129 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +118 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:129:14 + --> $DIR/invalid-target.rs:118:14 | -129 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +118 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:129:24 + --> $DIR/invalid-target.rs:118:24 | -129 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +118 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:129:44 + --> $DIR/invalid-target.rs:118:44 | -129 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +118 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:129:57 + --> $DIR/invalid-target.rs:118:57 | -129 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +118 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:129:63 + --> $DIR/invalid-target.rs:118:63 | -129 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +118 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a type alias - --> $DIR/invalid-target.rs:130:5 + --> $DIR/invalid-target.rs:119:5 | -130 | unroll_loops, // fn/closure-only +119 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:135:5 + --> $DIR/invalid-target.rs:124:5 | -135 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +124 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:135:14 + --> $DIR/invalid-target.rs:124:14 | -135 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +124 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:135:21 + --> $DIR/invalid-target.rs:124:21 | -135 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +124 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:136:5 + --> $DIR/invalid-target.rs:124:36 | -136 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +124 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a type alias + --> $DIR/invalid-target.rs:125:5 + | +125 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:126:5 + | +126 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:126:14 + | +126 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:126:24 + | +126 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:126:44 + | +126 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:126:57 + | +126 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:126:63 + | +126 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^^ + +error: attribute is only valid on a function or closure, not on a type alias + --> $DIR/invalid-target.rs:127:5 + | +127 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:136:5 + | +136 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:136:14 + | +136 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:136:21 + | +136 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:136:36 + | +136 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a enum --> $DIR/invalid-target.rs:137:5 | 137 | vertex, // fn-only | ^^^^^^ -error: attribute is only valid on a function parameter, not on a type alias +error: attribute is only valid on a function parameter, not on a enum --> $DIR/invalid-target.rs:138:5 | 138 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ -error: attribute is only valid on a function parameter, not on a type alias +error: attribute is only valid on a function parameter, not on a enum --> $DIR/invalid-target.rs:138:14 | 138 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ -error: attribute is only valid on a function parameter, not on a type alias +error: attribute is only valid on a function parameter, not on a enum --> $DIR/invalid-target.rs:138:24 | 138 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a type alias +error: attribute is only valid on a function parameter, not on a enum --> $DIR/invalid-target.rs:138:44 | 138 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ -error: attribute is only valid on a function parameter, not on a type alias +error: attribute is only valid on a function parameter, not on a enum --> $DIR/invalid-target.rs:138:57 | 138 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ -error: attribute is only valid on a function parameter, not on a type alias +error: attribute is only valid on a function parameter, not on a enum --> $DIR/invalid-target.rs:138:63 | 138 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ -error: attribute is only valid on a function or closure, not on a type alias +error: attribute is only valid on a function or closure, not on a enum --> $DIR/invalid-target.rs:139:5 | 139 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ -error: attribute is only valid on a struct, not on a enum - --> $DIR/invalid-target.rs:148:5 - | -148 | sampler, block, sampled_image, // struct-only (incl. `image_type`) - | ^^^^^^^ - -error: attribute is only valid on a struct, not on a enum - --> $DIR/invalid-target.rs:148:14 - | -148 | sampler, block, sampled_image, // struct-only (incl. `image_type`) - | ^^^^^ - -error: attribute is only valid on a struct, not on a enum - --> $DIR/invalid-target.rs:148:21 - | -148 | sampler, block, sampled_image, // struct-only (incl. `image_type`) - | ^^^^^^^^^^^^^ - -error: attribute is only valid on a struct, not on a enum - --> $DIR/invalid-target.rs:149:5 - | -149 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: attribute is only valid on a function, not on a enum - --> $DIR/invalid-target.rs:150:5 - | -150 | vertex, // fn-only - | ^^^^^^ - -error: attribute is only valid on a function parameter, not on a enum - --> $DIR/invalid-target.rs:151:5 - | -151 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^ - -error: attribute is only valid on a function parameter, not on a enum - --> $DIR/invalid-target.rs:151:14 - | -151 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^ - -error: attribute is only valid on a function parameter, not on a enum - --> $DIR/invalid-target.rs:151:24 - | -151 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^^^^^^^^^^^ - -error: attribute is only valid on a function parameter, not on a enum - --> $DIR/invalid-target.rs:151:44 - | -151 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^^^^ - -error: attribute is only valid on a function parameter, not on a enum - --> $DIR/invalid-target.rs:151:57 - | -151 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^ - -error: attribute is only valid on a function parameter, not on a enum - --> $DIR/invalid-target.rs:151:63 - | -151 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^^ - -error: attribute is only valid on a function or closure, not on a enum - --> $DIR/invalid-target.rs:152:5 - | -152 | unroll_loops, // fn/closure-only - | ^^^^^^^^^^^^ - error: attribute is only valid on a struct, not on a enum variant - --> $DIR/invalid-target.rs:156:9 + --> $DIR/invalid-target.rs:143:9 | -156 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +143 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a enum variant - --> $DIR/invalid-target.rs:156:18 + --> $DIR/invalid-target.rs:143:18 | -156 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +143 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a enum variant - --> $DIR/invalid-target.rs:156:25 + --> $DIR/invalid-target.rs:143:25 | -156 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +143 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a enum variant - --> $DIR/invalid-target.rs:157:9 + --> $DIR/invalid-target.rs:143:40 | -157 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +143 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a enum variant - --> $DIR/invalid-target.rs:158:9 + --> $DIR/invalid-target.rs:144:9 | -158 | vertex, // fn-only +144 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a enum variant - --> $DIR/invalid-target.rs:159:9 + --> $DIR/invalid-target.rs:145:9 | -159 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +145 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a enum variant - --> $DIR/invalid-target.rs:159:18 + --> $DIR/invalid-target.rs:145:18 | -159 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +145 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a enum variant - --> $DIR/invalid-target.rs:159:28 + --> $DIR/invalid-target.rs:145:28 | -159 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +145 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a enum variant - --> $DIR/invalid-target.rs:159:48 + --> $DIR/invalid-target.rs:145:48 | -159 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +145 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a enum variant - --> $DIR/invalid-target.rs:159:61 + --> $DIR/invalid-target.rs:145:61 | -159 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +145 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a enum variant - --> $DIR/invalid-target.rs:159:67 + --> $DIR/invalid-target.rs:145:67 | -159 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +145 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a enum variant - --> $DIR/invalid-target.rs:160:9 + --> $DIR/invalid-target.rs:146:9 | -160 | unroll_loops, // fn/closure-only +146 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:164:13 + --> $DIR/invalid-target.rs:150:13 | -164 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +150 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:164:22 + --> $DIR/invalid-target.rs:150:22 | -164 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +150 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:164:29 + --> $DIR/invalid-target.rs:150:29 | -164 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +150 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:165:13 + --> $DIR/invalid-target.rs:150:44 | -165 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +150 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a struct field - --> $DIR/invalid-target.rs:166:13 + --> $DIR/invalid-target.rs:151:13 | -166 | vertex, // fn-only +151 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:167:13 + --> $DIR/invalid-target.rs:152:13 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +152 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:167:22 + --> $DIR/invalid-target.rs:152:22 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +152 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:167:32 + --> $DIR/invalid-target.rs:152:32 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +152 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:167:52 + --> $DIR/invalid-target.rs:152:52 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +152 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:167:65 + --> $DIR/invalid-target.rs:152:65 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +152 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:167:71 + --> $DIR/invalid-target.rs:152:71 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +152 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a struct field - --> $DIR/invalid-target.rs:168:13 + --> $DIR/invalid-target.rs:153:13 | -168 | unroll_loops, // fn/closure-only +153 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a union - --> $DIR/invalid-target.rs:175:5 + --> $DIR/invalid-target.rs:160:5 | -175 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +160 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a union - --> $DIR/invalid-target.rs:175:14 + --> $DIR/invalid-target.rs:160:14 | -175 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +160 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a union - --> $DIR/invalid-target.rs:175:21 + --> $DIR/invalid-target.rs:160:21 | -175 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +160 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a union - --> $DIR/invalid-target.rs:176:5 + --> $DIR/invalid-target.rs:160:36 | -176 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +160 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a union - --> $DIR/invalid-target.rs:177:5 + --> $DIR/invalid-target.rs:161:5 | -177 | vertex, // fn-only +161 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a union - --> $DIR/invalid-target.rs:178:5 + --> $DIR/invalid-target.rs:162:5 | -178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +162 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a union - --> $DIR/invalid-target.rs:178:14 + --> $DIR/invalid-target.rs:162:14 | -178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +162 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a union - --> $DIR/invalid-target.rs:178:24 + --> $DIR/invalid-target.rs:162:24 | -178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +162 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a union - --> $DIR/invalid-target.rs:178:44 + --> $DIR/invalid-target.rs:162:44 | -178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +162 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a union - --> $DIR/invalid-target.rs:178:57 + --> $DIR/invalid-target.rs:162:57 | -178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +162 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a union - --> $DIR/invalid-target.rs:178:63 + --> $DIR/invalid-target.rs:162:63 | -178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +162 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a union - --> $DIR/invalid-target.rs:179:5 + --> $DIR/invalid-target.rs:163:5 | -179 | unroll_loops, // fn/closure-only +163 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:183:9 + --> $DIR/invalid-target.rs:167:9 | -183 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +167 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:183:18 + --> $DIR/invalid-target.rs:167:18 | -183 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +167 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:183:25 + --> $DIR/invalid-target.rs:167:25 | -183 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +167 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:184:9 + --> $DIR/invalid-target.rs:167:40 | -184 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +167 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a struct field - --> $DIR/invalid-target.rs:185:9 + --> $DIR/invalid-target.rs:168:9 | -185 | vertex, // fn-only +168 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:186:9 + --> $DIR/invalid-target.rs:169:9 | -186 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +169 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:186:18 + --> $DIR/invalid-target.rs:169:18 | -186 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +169 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:186:28 + --> $DIR/invalid-target.rs:169:28 | -186 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +169 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:186:48 + --> $DIR/invalid-target.rs:169:48 | -186 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +169 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:186:61 + --> $DIR/invalid-target.rs:169:61 | -186 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +169 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:186:67 + --> $DIR/invalid-target.rs:169:67 | -186 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +169 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a struct field - --> $DIR/invalid-target.rs:187:9 + --> $DIR/invalid-target.rs:170:9 | -187 | unroll_loops, // fn/closure-only +170 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a function, not on a struct - --> $DIR/invalid-target.rs:193:5 + --> $DIR/invalid-target.rs:176:5 | -193 | vertex, // fn-only +176 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct - --> $DIR/invalid-target.rs:194:5 + --> $DIR/invalid-target.rs:177:5 | -194 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +177 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a struct - --> $DIR/invalid-target.rs:194:14 + --> $DIR/invalid-target.rs:177:14 | -194 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +177 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct - --> $DIR/invalid-target.rs:194:24 + --> $DIR/invalid-target.rs:177:24 | -194 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +177 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct - --> $DIR/invalid-target.rs:194:44 + --> $DIR/invalid-target.rs:177:44 | -194 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +177 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct - --> $DIR/invalid-target.rs:194:57 + --> $DIR/invalid-target.rs:177:57 | -194 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +177 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a struct - --> $DIR/invalid-target.rs:194:63 + --> $DIR/invalid-target.rs:177:63 | -194 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +177 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a struct - --> $DIR/invalid-target.rs:195:5 + --> $DIR/invalid-target.rs:178:5 | -195 | unroll_loops, // fn/closure-only +178 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:199:9 + --> $DIR/invalid-target.rs:182:9 | -199 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +182 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:199:18 + --> $DIR/invalid-target.rs:182:18 | -199 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +182 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:199:25 + --> $DIR/invalid-target.rs:182:25 | -199 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +182 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:200:9 + --> $DIR/invalid-target.rs:182:40 | -200 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +182 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a struct field - --> $DIR/invalid-target.rs:201:9 + --> $DIR/invalid-target.rs:183:9 | -201 | vertex, // fn-only +183 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:202:9 + --> $DIR/invalid-target.rs:184:9 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +184 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:202:18 + --> $DIR/invalid-target.rs:184:18 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +184 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:202:28 + --> $DIR/invalid-target.rs:184:28 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +184 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:202:48 + --> $DIR/invalid-target.rs:184:48 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +184 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:202:61 + --> $DIR/invalid-target.rs:184:61 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +184 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:202:67 + --> $DIR/invalid-target.rs:184:67 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +184 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a struct field - --> $DIR/invalid-target.rs:203:9 + --> $DIR/invalid-target.rs:185:9 | -203 | unroll_loops, // fn/closure-only +185 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:209:5 + --> $DIR/invalid-target.rs:191:5 | -209 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +191 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:209:14 + --> $DIR/invalid-target.rs:191:14 | -209 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +191 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:209:21 + --> $DIR/invalid-target.rs:191:21 | -209 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +191 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:210:5 + --> $DIR/invalid-target.rs:191:36 | -210 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +191 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a item - --> $DIR/invalid-target.rs:211:5 + --> $DIR/invalid-target.rs:192:5 | -211 | vertex, // fn-only +192 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:212:5 + --> $DIR/invalid-target.rs:193:5 | -212 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +193 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:212:14 + --> $DIR/invalid-target.rs:193:14 | -212 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +193 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:212:24 + --> $DIR/invalid-target.rs:193:24 | -212 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +193 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:212:44 + --> $DIR/invalid-target.rs:193:44 | -212 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +193 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:212:57 + --> $DIR/invalid-target.rs:193:57 | -212 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +193 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:212:63 + --> $DIR/invalid-target.rs:193:63 | -212 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +193 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a item - --> $DIR/invalid-target.rs:213:5 + --> $DIR/invalid-target.rs:194:5 | -213 | unroll_loops, // fn/closure-only +194 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a trait alias - --> $DIR/invalid-target.rs:234:5 + --> $DIR/invalid-target.rs:213:5 | -234 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +213 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a trait alias - --> $DIR/invalid-target.rs:234:14 + --> $DIR/invalid-target.rs:213:14 | -234 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +213 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a trait alias - --> $DIR/invalid-target.rs:234:21 + --> $DIR/invalid-target.rs:213:21 | -234 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +213 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a trait alias - --> $DIR/invalid-target.rs:235:5 + --> $DIR/invalid-target.rs:213:36 | -235 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +213 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a trait alias - --> $DIR/invalid-target.rs:236:5 + --> $DIR/invalid-target.rs:214:5 | -236 | vertex, // fn-only +214 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a trait alias - --> $DIR/invalid-target.rs:237:5 + --> $DIR/invalid-target.rs:215:5 | -237 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a trait alias - --> $DIR/invalid-target.rs:237:14 + --> $DIR/invalid-target.rs:215:14 | -237 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a trait alias - --> $DIR/invalid-target.rs:237:24 + --> $DIR/invalid-target.rs:215:24 | -237 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a trait alias - --> $DIR/invalid-target.rs:237:44 + --> $DIR/invalid-target.rs:215:44 | -237 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a trait alias - --> $DIR/invalid-target.rs:237:57 + --> $DIR/invalid-target.rs:215:57 | -237 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a trait alias - --> $DIR/invalid-target.rs:237:63 + --> $DIR/invalid-target.rs:215:63 | -237 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a trait alias - --> $DIR/invalid-target.rs:238:5 + --> $DIR/invalid-target.rs:216:5 | -238 | unroll_loops, // fn/closure-only +216 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a trait - --> $DIR/invalid-target.rs:243:5 + --> $DIR/invalid-target.rs:221:5 | -243 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +221 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a trait - --> $DIR/invalid-target.rs:243:14 + --> $DIR/invalid-target.rs:221:14 | -243 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +221 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a trait - --> $DIR/invalid-target.rs:243:21 + --> $DIR/invalid-target.rs:221:21 | -243 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +221 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a trait - --> $DIR/invalid-target.rs:244:5 + --> $DIR/invalid-target.rs:221:36 | -244 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +221 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a trait - --> $DIR/invalid-target.rs:245:5 + --> $DIR/invalid-target.rs:222:5 | -245 | vertex, // fn-only +222 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a trait - --> $DIR/invalid-target.rs:246:5 + --> $DIR/invalid-target.rs:223:5 | -246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +223 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a trait - --> $DIR/invalid-target.rs:246:14 + --> $DIR/invalid-target.rs:223:14 | -246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +223 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a trait - --> $DIR/invalid-target.rs:246:24 + --> $DIR/invalid-target.rs:223:24 | -246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +223 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a trait - --> $DIR/invalid-target.rs:246:44 + --> $DIR/invalid-target.rs:223:44 | -246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +223 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a trait - --> $DIR/invalid-target.rs:246:57 + --> $DIR/invalid-target.rs:223:57 | -246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +223 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a trait - --> $DIR/invalid-target.rs:246:63 + --> $DIR/invalid-target.rs:223:63 | -246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +223 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a trait - --> $DIR/invalid-target.rs:247:5 + --> $DIR/invalid-target.rs:224:5 | -247 | unroll_loops, // fn/closure-only +224 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:286:5 + --> $DIR/invalid-target.rs:259:5 | -286 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +259 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:286:14 + --> $DIR/invalid-target.rs:259:14 | -286 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +259 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:286:21 + --> $DIR/invalid-target.rs:259:21 | -286 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +259 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a item - --> $DIR/invalid-target.rs:287:5 + --> $DIR/invalid-target.rs:259:36 | -287 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +259 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a item - --> $DIR/invalid-target.rs:288:5 + --> $DIR/invalid-target.rs:260:5 | -288 | vertex, // fn-only +260 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:289:5 + --> $DIR/invalid-target.rs:261:5 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +261 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:289:14 + --> $DIR/invalid-target.rs:261:14 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +261 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:289:24 + --> $DIR/invalid-target.rs:261:24 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +261 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:289:44 + --> $DIR/invalid-target.rs:261:44 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +261 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:289:57 + --> $DIR/invalid-target.rs:261:57 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +261 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a item - --> $DIR/invalid-target.rs:289:63 + --> $DIR/invalid-target.rs:261:63 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +261 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a item - --> $DIR/invalid-target.rs:290:5 + --> $DIR/invalid-target.rs:262:5 | -290 | unroll_loops, // fn/closure-only +262 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a function - --> $DIR/invalid-target.rs:320:5 + --> $DIR/invalid-target.rs:289:5 | -320 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +289 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a function - --> $DIR/invalid-target.rs:320:14 + --> $DIR/invalid-target.rs:289:14 | -320 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +289 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a function - --> $DIR/invalid-target.rs:320:21 + --> $DIR/invalid-target.rs:289:21 | -320 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +289 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a function - --> $DIR/invalid-target.rs:321:5 + --> $DIR/invalid-target.rs:289:36 | -321 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +289 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a function - --> $DIR/invalid-target.rs:322:5 + --> $DIR/invalid-target.rs:290:5 | -322 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +290 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a function - --> $DIR/invalid-target.rs:322:14 + --> $DIR/invalid-target.rs:290:14 | -322 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +290 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a function - --> $DIR/invalid-target.rs:322:24 + --> $DIR/invalid-target.rs:290:24 | -322 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +290 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a function - --> $DIR/invalid-target.rs:322:44 + --> $DIR/invalid-target.rs:290:44 | -322 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +290 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a function - --> $DIR/invalid-target.rs:322:57 + --> $DIR/invalid-target.rs:290:57 | -322 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +290 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a function - --> $DIR/invalid-target.rs:322:63 + --> $DIR/invalid-target.rs:290:63 | -322 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +290 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a function param - --> $DIR/invalid-target.rs:326:9 + --> $DIR/invalid-target.rs:294:9 | -326 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +294 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a function param - --> $DIR/invalid-target.rs:326:18 + --> $DIR/invalid-target.rs:294:18 | -326 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +294 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a function param - --> $DIR/invalid-target.rs:326:25 + --> $DIR/invalid-target.rs:294:25 | -326 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +294 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a function param - --> $DIR/invalid-target.rs:327:9 + --> $DIR/invalid-target.rs:294:40 | -327 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +294 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a function param - --> $DIR/invalid-target.rs:328:9 + --> $DIR/invalid-target.rs:295:9 | -328 | vertex, // fn-only +295 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function or closure, not on a function param - --> $DIR/invalid-target.rs:329:9 + --> $DIR/invalid-target.rs:296:9 | -329 | unroll_loops, // fn/closure-only +296 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a statement - --> $DIR/invalid-target.rs:334:9 + --> $DIR/invalid-target.rs:301:9 | -334 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +301 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a statement - --> $DIR/invalid-target.rs:334:18 + --> $DIR/invalid-target.rs:301:18 | -334 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +301 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a statement - --> $DIR/invalid-target.rs:334:25 + --> $DIR/invalid-target.rs:301:25 | -334 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +301 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a statement - --> $DIR/invalid-target.rs:335:9 + --> $DIR/invalid-target.rs:301:40 | -335 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +301 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a statement - --> $DIR/invalid-target.rs:336:9 + --> $DIR/invalid-target.rs:302:9 | -336 | vertex, // fn-only +302 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a statement - --> $DIR/invalid-target.rs:337:9 + --> $DIR/invalid-target.rs:303:9 | -337 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +303 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a statement - --> $DIR/invalid-target.rs:337:18 + --> $DIR/invalid-target.rs:303:18 | -337 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +303 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a statement - --> $DIR/invalid-target.rs:337:28 + --> $DIR/invalid-target.rs:303:28 | -337 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +303 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a statement - --> $DIR/invalid-target.rs:337:48 + --> $DIR/invalid-target.rs:303:48 | -337 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +303 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a statement - --> $DIR/invalid-target.rs:337:61 + --> $DIR/invalid-target.rs:303:61 | -337 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +303 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a statement - --> $DIR/invalid-target.rs:337:67 + --> $DIR/invalid-target.rs:303:67 | -337 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +303 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a statement - --> $DIR/invalid-target.rs:338:9 + --> $DIR/invalid-target.rs:304:9 | -338 | unroll_loops, // fn/closure-only +304 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a closure - --> $DIR/invalid-target.rs:343:13 + --> $DIR/invalid-target.rs:309:13 | -343 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +309 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a closure - --> $DIR/invalid-target.rs:343:22 + --> $DIR/invalid-target.rs:309:22 | -343 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +309 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a closure - --> $DIR/invalid-target.rs:343:29 + --> $DIR/invalid-target.rs:309:29 | -343 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +309 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a closure - --> $DIR/invalid-target.rs:344:13 + --> $DIR/invalid-target.rs:309:44 | -344 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +309 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a closure - --> $DIR/invalid-target.rs:345:13 + --> $DIR/invalid-target.rs:310:13 | -345 | vertex, // fn-only +310 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a closure - --> $DIR/invalid-target.rs:346:13 + --> $DIR/invalid-target.rs:311:13 | -346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +311 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a closure - --> $DIR/invalid-target.rs:346:22 + --> $DIR/invalid-target.rs:311:22 | -346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +311 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a closure - --> $DIR/invalid-target.rs:346:32 + --> $DIR/invalid-target.rs:311:32 | -346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +311 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a closure - --> $DIR/invalid-target.rs:346:52 + --> $DIR/invalid-target.rs:311:52 | -346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +311 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a closure - --> $DIR/invalid-target.rs:346:65 + --> $DIR/invalid-target.rs:311:65 | -346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +311 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a closure - --> $DIR/invalid-target.rs:346:71 + --> $DIR/invalid-target.rs:311:71 | -346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +311 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a expression - --> $DIR/invalid-target.rs:352:13 + --> $DIR/invalid-target.rs:317:13 | -352 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +317 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a expression - --> $DIR/invalid-target.rs:352:22 + --> $DIR/invalid-target.rs:317:22 | -352 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +317 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a expression - --> $DIR/invalid-target.rs:352:29 + --> $DIR/invalid-target.rs:317:29 | -352 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +317 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a expression - --> $DIR/invalid-target.rs:353:13 + --> $DIR/invalid-target.rs:317:44 | -353 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +317 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a expression - --> $DIR/invalid-target.rs:354:13 + --> $DIR/invalid-target.rs:318:13 | -354 | vertex, // fn-only +318 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a expression - --> $DIR/invalid-target.rs:355:13 + --> $DIR/invalid-target.rs:319:13 | -355 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a expression - --> $DIR/invalid-target.rs:355:22 + --> $DIR/invalid-target.rs:319:22 | -355 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a expression - --> $DIR/invalid-target.rs:355:32 + --> $DIR/invalid-target.rs:319:32 | -355 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a expression - --> $DIR/invalid-target.rs:355:52 + --> $DIR/invalid-target.rs:319:52 | -355 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a expression - --> $DIR/invalid-target.rs:355:65 + --> $DIR/invalid-target.rs:319:65 | -355 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a expression - --> $DIR/invalid-target.rs:355:71 + --> $DIR/invalid-target.rs:319:71 | -355 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a expression - --> $DIR/invalid-target.rs:356:13 + --> $DIR/invalid-target.rs:320:13 | -356 | unroll_loops, // fn/closure-only +320 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a match arm - --> $DIR/invalid-target.rs:363:13 + --> $DIR/invalid-target.rs:327:13 | -363 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +327 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a match arm - --> $DIR/invalid-target.rs:363:22 + --> $DIR/invalid-target.rs:327:22 | -363 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +327 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a match arm - --> $DIR/invalid-target.rs:363:29 + --> $DIR/invalid-target.rs:327:29 | -363 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +327 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a match arm - --> $DIR/invalid-target.rs:364:13 + --> $DIR/invalid-target.rs:327:44 | -364 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +327 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a match arm - --> $DIR/invalid-target.rs:365:13 + --> $DIR/invalid-target.rs:328:13 | -365 | vertex, // fn-only +328 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a match arm - --> $DIR/invalid-target.rs:366:13 + --> $DIR/invalid-target.rs:329:13 | -366 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +329 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a match arm - --> $DIR/invalid-target.rs:366:22 + --> $DIR/invalid-target.rs:329:22 | -366 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +329 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a match arm - --> $DIR/invalid-target.rs:366:32 + --> $DIR/invalid-target.rs:329:32 | -366 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +329 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a match arm - --> $DIR/invalid-target.rs:366:52 + --> $DIR/invalid-target.rs:329:52 | -366 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +329 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a match arm - --> $DIR/invalid-target.rs:366:65 + --> $DIR/invalid-target.rs:329:65 | -366 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +329 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a match arm - --> $DIR/invalid-target.rs:366:71 + --> $DIR/invalid-target.rs:329:71 | -366 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +329 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a match arm - --> $DIR/invalid-target.rs:367:13 + --> $DIR/invalid-target.rs:330:13 | -367 | unroll_loops, // fn/closure-only +330 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:251:9 + --> $DIR/invalid-target.rs:228:9 | -251 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +228 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:251:18 + --> $DIR/invalid-target.rs:228:18 | -251 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +228 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:251:25 + --> $DIR/invalid-target.rs:228:25 | -251 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +228 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:252:9 + --> $DIR/invalid-target.rs:228:40 | -252 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +228 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a associated type - --> $DIR/invalid-target.rs:253:9 + --> $DIR/invalid-target.rs:229:9 | -253 | vertex, // fn-only +229 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:254:9 + --> $DIR/invalid-target.rs:230:9 | -254 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +230 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:254:18 + --> $DIR/invalid-target.rs:230:18 | -254 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +230 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:254:28 + --> $DIR/invalid-target.rs:230:28 | -254 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +230 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:254:48 + --> $DIR/invalid-target.rs:230:48 | -254 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +230 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:254:61 + --> $DIR/invalid-target.rs:230:61 | -254 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +230 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:254:67 + --> $DIR/invalid-target.rs:230:67 | -254 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +230 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a associated type - --> $DIR/invalid-target.rs:255:9 + --> $DIR/invalid-target.rs:231:9 | -255 | unroll_loops, // fn/closure-only +231 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:260:9 + --> $DIR/invalid-target.rs:236:9 | -260 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +236 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:260:18 + --> $DIR/invalid-target.rs:236:18 | -260 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +236 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:260:25 + --> $DIR/invalid-target.rs:236:25 | -260 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +236 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:261:9 + --> $DIR/invalid-target.rs:236:40 | -261 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +236 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a associated const - --> $DIR/invalid-target.rs:262:9 + --> $DIR/invalid-target.rs:237:9 | -262 | vertex, // fn-only +237 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:263:9 + --> $DIR/invalid-target.rs:238:9 | -263 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +238 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:263:18 + --> $DIR/invalid-target.rs:238:18 | -263 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +238 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:263:28 + --> $DIR/invalid-target.rs:238:28 | -263 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +238 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:263:48 + --> $DIR/invalid-target.rs:238:48 | -263 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +238 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:263:61 + --> $DIR/invalid-target.rs:238:61 | -263 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +238 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:263:67 + --> $DIR/invalid-target.rs:238:67 | -263 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +238 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a associated const - --> $DIR/invalid-target.rs:264:9 + --> $DIR/invalid-target.rs:239:9 | -264 | unroll_loops, // fn/closure-only +239 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:269:9 + --> $DIR/invalid-target.rs:244:9 | -269 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +244 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:269:18 + --> $DIR/invalid-target.rs:244:18 | -269 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +244 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:269:25 + --> $DIR/invalid-target.rs:244:25 | -269 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +244 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:270:9 + --> $DIR/invalid-target.rs:244:40 | -270 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +244 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a method - --> $DIR/invalid-target.rs:271:9 + --> $DIR/invalid-target.rs:245:9 | -271 | vertex, // fn-only +245 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:272:9 + --> $DIR/invalid-target.rs:246:9 | -272 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:272:18 + --> $DIR/invalid-target.rs:246:18 | -272 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:272:28 + --> $DIR/invalid-target.rs:246:28 | -272 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:272:48 + --> $DIR/invalid-target.rs:246:48 | -272 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:272:61 + --> $DIR/invalid-target.rs:246:61 | -272 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:272:67 + --> $DIR/invalid-target.rs:246:67 | -272 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +246 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a method - --> $DIR/invalid-target.rs:273:9 + --> $DIR/invalid-target.rs:247:9 | -273 | unroll_loops, // fn/closure-only +247 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:278:9 + --> $DIR/invalid-target.rs:252:9 | -278 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +252 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:278:18 + --> $DIR/invalid-target.rs:252:18 | -278 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +252 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:278:25 + --> $DIR/invalid-target.rs:252:25 | -278 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +252 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:279:9 + --> $DIR/invalid-target.rs:252:40 | -279 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +252 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:280:9 + --> $DIR/invalid-target.rs:253:9 | -280 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +253 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:280:18 + --> $DIR/invalid-target.rs:253:18 | -280 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +253 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:280:28 + --> $DIR/invalid-target.rs:253:28 | -280 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +253 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:280:48 + --> $DIR/invalid-target.rs:253:48 | -280 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +253 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:280:61 + --> $DIR/invalid-target.rs:253:61 | -280 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +253 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:280:67 + --> $DIR/invalid-target.rs:253:67 | -280 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +253 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:217:9 + --> $DIR/invalid-target.rs:198:9 | -217 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +198 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:217:18 + --> $DIR/invalid-target.rs:198:18 | -217 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +198 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:217:25 + --> $DIR/invalid-target.rs:198:25 | -217 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +198 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:218:9 + --> $DIR/invalid-target.rs:198:40 | -218 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +198 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a associated const - --> $DIR/invalid-target.rs:219:9 + --> $DIR/invalid-target.rs:199:9 | -219 | vertex, // fn-only +199 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:220:9 + --> $DIR/invalid-target.rs:200:9 | -220 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +200 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:220:18 + --> $DIR/invalid-target.rs:200:18 | -220 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +200 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:220:28 + --> $DIR/invalid-target.rs:200:28 | -220 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +200 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:220:48 + --> $DIR/invalid-target.rs:200:48 | -220 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +200 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:220:61 + --> $DIR/invalid-target.rs:200:61 | -220 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +200 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:220:67 + --> $DIR/invalid-target.rs:200:67 | -220 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +200 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a associated const - --> $DIR/invalid-target.rs:221:9 + --> $DIR/invalid-target.rs:201:9 | -221 | unroll_loops, // fn/closure-only +201 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:226:9 + --> $DIR/invalid-target.rs:206:9 | -226 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +206 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:226:18 + --> $DIR/invalid-target.rs:206:18 | -226 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +206 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:226:25 + --> $DIR/invalid-target.rs:206:25 | -226 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +206 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:227:9 + --> $DIR/invalid-target.rs:206:40 | -227 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +206 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:228:9 + --> $DIR/invalid-target.rs:207:9 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +207 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:228:18 + --> $DIR/invalid-target.rs:207:18 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +207 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:228:28 + --> $DIR/invalid-target.rs:207:28 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +207 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:228:48 + --> $DIR/invalid-target.rs:207:48 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +207 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:228:61 + --> $DIR/invalid-target.rs:207:61 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +207 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:228:67 + --> $DIR/invalid-target.rs:207:67 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +207 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:294:9 + --> $DIR/invalid-target.rs:266:9 | -294 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +266 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:294:18 + --> $DIR/invalid-target.rs:266:18 | -294 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +266 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:294:25 + --> $DIR/invalid-target.rs:266:25 | -294 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +266 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated type - --> $DIR/invalid-target.rs:295:9 + --> $DIR/invalid-target.rs:266:40 | -295 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +266 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a associated type - --> $DIR/invalid-target.rs:296:9 + --> $DIR/invalid-target.rs:267:9 | -296 | vertex, // fn-only +267 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:297:9 + --> $DIR/invalid-target.rs:268:9 | -297 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +268 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:297:18 + --> $DIR/invalid-target.rs:268:18 | -297 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +268 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:297:28 + --> $DIR/invalid-target.rs:268:28 | -297 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +268 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:297:48 + --> $DIR/invalid-target.rs:268:48 | -297 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +268 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:297:61 + --> $DIR/invalid-target.rs:268:61 | -297 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +268 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:297:67 + --> $DIR/invalid-target.rs:268:67 | -297 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +268 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a associated type - --> $DIR/invalid-target.rs:298:9 + --> $DIR/invalid-target.rs:269:9 | -298 | unroll_loops, // fn/closure-only +269 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:303:9 + --> $DIR/invalid-target.rs:274:9 | -303 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +274 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:303:18 + --> $DIR/invalid-target.rs:274:18 | -303 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +274 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:303:25 + --> $DIR/invalid-target.rs:274:25 | -303 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +274 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a associated const - --> $DIR/invalid-target.rs:304:9 + --> $DIR/invalid-target.rs:274:40 | -304 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +274 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a associated const - --> $DIR/invalid-target.rs:305:9 + --> $DIR/invalid-target.rs:275:9 | -305 | vertex, // fn-only +275 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:306:9 + --> $DIR/invalid-target.rs:276:9 | -306 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +276 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:306:18 + --> $DIR/invalid-target.rs:276:18 | -306 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +276 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:306:28 + --> $DIR/invalid-target.rs:276:28 | -306 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +276 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:306:48 + --> $DIR/invalid-target.rs:276:48 | -306 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +276 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:306:61 + --> $DIR/invalid-target.rs:276:61 | -306 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +276 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:306:67 + --> $DIR/invalid-target.rs:276:67 | -306 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +276 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a associated const - --> $DIR/invalid-target.rs:307:9 + --> $DIR/invalid-target.rs:277:9 | -307 | unroll_loops, // fn/closure-only +277 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:312:9 + --> $DIR/invalid-target.rs:282:9 | -312 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +282 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:312:18 + --> $DIR/invalid-target.rs:282:18 | -312 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +282 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:312:25 + --> $DIR/invalid-target.rs:282:25 | -312 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +282 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a method - --> $DIR/invalid-target.rs:313:9 + --> $DIR/invalid-target.rs:282:40 | -313 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +282 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:314:9 + --> $DIR/invalid-target.rs:283:9 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +283 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:314:18 + --> $DIR/invalid-target.rs:283:18 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +283 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:314:28 + --> $DIR/invalid-target.rs:283:28 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +283 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:314:48 + --> $DIR/invalid-target.rs:283:48 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +283 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:314:61 + --> $DIR/invalid-target.rs:283:61 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +283 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a method - --> $DIR/invalid-target.rs:314:67 + --> $DIR/invalid-target.rs:283:67 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +283 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign type - --> $DIR/invalid-target.rs:80:9 + --> $DIR/invalid-target.rs:75:9 | -80 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +75 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a foreign type - --> $DIR/invalid-target.rs:80:18 + --> $DIR/invalid-target.rs:75:18 | -80 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +75 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a foreign type - --> $DIR/invalid-target.rs:80:25 + --> $DIR/invalid-target.rs:75:25 | -80 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +75 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign type - --> $DIR/invalid-target.rs:81:9 + --> $DIR/invalid-target.rs:75:40 | -81 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +75 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a foreign type - --> $DIR/invalid-target.rs:82:9 + --> $DIR/invalid-target.rs:76:9 | -82 | vertex, // fn-only +76 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a foreign type - --> $DIR/invalid-target.rs:83:9 + --> $DIR/invalid-target.rs:77:9 | -83 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +77 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign type - --> $DIR/invalid-target.rs:83:18 + --> $DIR/invalid-target.rs:77:18 | -83 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +77 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign type - --> $DIR/invalid-target.rs:83:28 + --> $DIR/invalid-target.rs:77:28 | -83 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +77 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign type - --> $DIR/invalid-target.rs:83:48 + --> $DIR/invalid-target.rs:77:48 | -83 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +77 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign type - --> $DIR/invalid-target.rs:83:61 + --> $DIR/invalid-target.rs:77:61 | -83 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +77 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a foreign type - --> $DIR/invalid-target.rs:83:67 + --> $DIR/invalid-target.rs:77:67 | -83 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +77 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a foreign type - --> $DIR/invalid-target.rs:84:9 + --> $DIR/invalid-target.rs:78:9 | -84 | unroll_loops, // fn/closure-only +78 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign static item - --> $DIR/invalid-target.rs:89:9 + --> $DIR/invalid-target.rs:83:9 | -89 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +83 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a foreign static item - --> $DIR/invalid-target.rs:89:18 + --> $DIR/invalid-target.rs:83:18 | -89 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +83 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a foreign static item - --> $DIR/invalid-target.rs:89:25 + --> $DIR/invalid-target.rs:83:25 | -89 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +83 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign static item - --> $DIR/invalid-target.rs:90:9 + --> $DIR/invalid-target.rs:83:40 | -90 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +83 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a foreign static item - --> $DIR/invalid-target.rs:91:9 + --> $DIR/invalid-target.rs:84:9 | -91 | vertex, // fn-only +84 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a foreign static item - --> $DIR/invalid-target.rs:92:9 + --> $DIR/invalid-target.rs:85:9 | -92 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +85 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign static item - --> $DIR/invalid-target.rs:92:18 + --> $DIR/invalid-target.rs:85:18 | -92 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +85 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign static item - --> $DIR/invalid-target.rs:92:28 + --> $DIR/invalid-target.rs:85:28 | -92 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +85 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign static item - --> $DIR/invalid-target.rs:92:48 + --> $DIR/invalid-target.rs:85:48 | -92 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +85 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign static item - --> $DIR/invalid-target.rs:92:61 + --> $DIR/invalid-target.rs:85:61 | -92 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +85 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a foreign static item - --> $DIR/invalid-target.rs:92:67 + --> $DIR/invalid-target.rs:85:67 | -92 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +85 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a foreign static item - --> $DIR/invalid-target.rs:93:9 + --> $DIR/invalid-target.rs:86:9 | -93 | unroll_loops, // fn/closure-only +86 | unroll_loops, // fn/closure-only | ^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign function - --> $DIR/invalid-target.rs:98:9 + --> $DIR/invalid-target.rs:91:9 | -98 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +91 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a foreign function - --> $DIR/invalid-target.rs:98:18 + --> $DIR/invalid-target.rs:91:18 | -98 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +91 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a foreign function - --> $DIR/invalid-target.rs:98:25 + --> $DIR/invalid-target.rs:91:25 | -98 | sampler, block, sampled_image, // struct-only (incl. `image_type`) +91 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign function - --> $DIR/invalid-target.rs:99:9 + --> $DIR/invalid-target.rs:91:40 | -99 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +91 | sampler, block, sampled_image, generic_image_type, // struct-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a foreign function - --> $DIR/invalid-target.rs:100:9 - | -100 | vertex, // fn-only - | ^^^^^^ + --> $DIR/invalid-target.rs:92:9 + | +92 | vertex, // fn-only + | ^^^^^^ error: attribute is only valid on a function parameter, not on a foreign function - --> $DIR/invalid-target.rs:101:9 - | -101 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^ + --> $DIR/invalid-target.rs:93:9 + | +93 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign function - --> $DIR/invalid-target.rs:101:18 - | -101 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^ + --> $DIR/invalid-target.rs:93:18 + | +93 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign function - --> $DIR/invalid-target.rs:101:28 - | -101 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^^^^^^^^^^^ + --> $DIR/invalid-target.rs:93:28 + | +93 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign function - --> $DIR/invalid-target.rs:101:48 - | -101 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^^^^ + --> $DIR/invalid-target.rs:93:48 + | +93 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a foreign function - --> $DIR/invalid-target.rs:101:61 - | -101 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^ + --> $DIR/invalid-target.rs:93:61 + | +93 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^ error: attribute is only valid on a function parameter, not on a foreign function - --> $DIR/invalid-target.rs:101:67 - | -101 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only - | ^^^^^^^^^ + --> $DIR/invalid-target.rs:93:67 + | +93 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only + | ^^^^^^^^^ error: attribute is only valid on a function or closure, not on a foreign function - --> $DIR/invalid-target.rs:102:9 - | -102 | unroll_loops, // fn/closure-only - | ^^^^^^^^^^^^ + --> $DIR/invalid-target.rs:94:9 + | +94 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ error: #[spirv(..)] cannot be applied to a macro --> $DIR/invalid-target.rs:33:1 | 33 | / #[spirv( -34 | | sampler, block, sampled_image, // struct-only (incl. `image_type`) -35 | | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), -36 | | vertex, // fn-only -37 | | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only -38 | | unroll_loops, // fn/closure-only -39 | | )] +34 | | sampler, block, sampled_image, generic_image_type, // struct-only +35 | | vertex, // fn-only +36 | | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +37 | | unroll_loops, // fn/closure-only +38 | | )] | |__^ error: aborting due to 462 previous errors diff --git a/tests/ui/spirv-attr/multiple.rs b/tests/ui/spirv-attr/multiple.rs index 0a06fdfd0d..0b6ad61efc 100644 --- a/tests/ui/spirv-attr/multiple.rs +++ b/tests/ui/spirv-attr/multiple.rs @@ -8,17 +8,7 @@ use spirv_std as _; #[spirv(sampler, sampler)] struct _SameIntrinsicType {} -#[spirv( - sampler, - image_type( - dim = "Dim2D", - depth = 0, - arrayed = 0, - multisampled = 0, - sampled = 1, - image_format = "Unknown" - ) -)] +#[spirv(sampler, generic_image_type)] struct _DiffIntrinsicType {} #[spirv(block, block)] diff --git a/tests/ui/spirv-attr/multiple.stderr b/tests/ui/spirv-attr/multiple.stderr index cfd421a74f..5d462ecbe6 100644 --- a/tests/ui/spirv-attr/multiple.stderr +++ b/tests/ui/spirv-attr/multiple.stderr @@ -11,195 +11,189 @@ note: previous intrinsic type attribute | ^^^^^^^ error: only one intrinsic type attribute is allowed on a struct - --> $DIR/multiple.rs:13:5 + --> $DIR/multiple.rs:11:18 | -13 | / image_type( -14 | | dim = "Dim2D", -15 | | depth = 0, -16 | | arrayed = 0, -... | -19 | | image_format = "Unknown" -20 | | ) - | |_____^ +11 | #[spirv(sampler, generic_image_type)] + | ^^^^^^^^^^^^^^^^^^ | note: previous intrinsic type attribute - --> $DIR/multiple.rs:12:5 + --> $DIR/multiple.rs:11:9 | -12 | sampler, - | ^^^^^^^ +11 | #[spirv(sampler, generic_image_type)] + | ^^^^^^^ error: only one #[spirv(block)] attribute is allowed on a struct - --> $DIR/multiple.rs:24:16 + --> $DIR/multiple.rs:14:16 | -24 | #[spirv(block, block)] +14 | #[spirv(block, block)] | ^^^^^ | note: previous #[spirv(block)] attribute - --> $DIR/multiple.rs:24:9 + --> $DIR/multiple.rs:14:9 | -24 | #[spirv(block, block)] +14 | #[spirv(block, block)] | ^^^^^ warning: #[spirv(block)] is no longer needed and should be removed - --> $DIR/multiple.rs:24:9 + --> $DIR/multiple.rs:14:9 | -24 | #[spirv(block, block)] +14 | #[spirv(block, block)] | ^^^^^ error: only one entry-point attribute is allowed on a function - --> $DIR/multiple.rs:27:17 + --> $DIR/multiple.rs:17:17 | -27 | #[spirv(vertex, vertex)] +17 | #[spirv(vertex, vertex)] | ^^^^^^ | note: previous entry-point attribute - --> $DIR/multiple.rs:27:9 + --> $DIR/multiple.rs:17:9 | -27 | #[spirv(vertex, vertex)] +17 | #[spirv(vertex, vertex)] | ^^^^^^ error: only one entry-point attribute is allowed on a function - --> $DIR/multiple.rs:30:17 + --> $DIR/multiple.rs:20:17 | -30 | #[spirv(vertex, fragment)] +20 | #[spirv(vertex, fragment)] | ^^^^^^^^ | note: previous entry-point attribute - --> $DIR/multiple.rs:30:9 + --> $DIR/multiple.rs:20:9 | -30 | #[spirv(vertex, fragment)] +20 | #[spirv(vertex, fragment)] | ^^^^^^ error: only one storage class attribute is allowed on a function param - --> $DIR/multiple.rs:35:22 + --> $DIR/multiple.rs:25:22 | -35 | #[spirv(uniform, uniform)] _same_storage_class: (), +25 | #[spirv(uniform, uniform)] _same_storage_class: (), | ^^^^^^^ | note: previous storage class attribute - --> $DIR/multiple.rs:35:13 + --> $DIR/multiple.rs:25:13 | -35 | #[spirv(uniform, uniform)] _same_storage_class: (), +25 | #[spirv(uniform, uniform)] _same_storage_class: (), | ^^^^^^^ error: only one storage class attribute is allowed on a function param - --> $DIR/multiple.rs:36:22 + --> $DIR/multiple.rs:26:22 | -36 | #[spirv(uniform, push_constant)] _diff_storage_class: (), +26 | #[spirv(uniform, push_constant)] _diff_storage_class: (), | ^^^^^^^^^^^^^ | note: previous storage class attribute - --> $DIR/multiple.rs:36:13 + --> $DIR/multiple.rs:26:13 | -36 | #[spirv(uniform, push_constant)] _diff_storage_class: (), +26 | #[spirv(uniform, push_constant)] _diff_storage_class: (), | ^^^^^^^ error: only one builtin attribute is allowed on a function param - --> $DIR/multiple.rs:38:23 + --> $DIR/multiple.rs:28:23 | -38 | #[spirv(position, position)] _same_builtin: (), +28 | #[spirv(position, position)] _same_builtin: (), | ^^^^^^^^ | note: previous builtin attribute - --> $DIR/multiple.rs:38:13 + --> $DIR/multiple.rs:28:13 | -38 | #[spirv(position, position)] _same_builtin: (), +28 | #[spirv(position, position)] _same_builtin: (), | ^^^^^^^^ error: only one builtin attribute is allowed on a function param - --> $DIR/multiple.rs:39:23 + --> $DIR/multiple.rs:29:23 | -39 | #[spirv(position, vertex_index)] _diff_builtin: (), +29 | #[spirv(position, vertex_index)] _diff_builtin: (), | ^^^^^^^^^^^^ | note: previous builtin attribute - --> $DIR/multiple.rs:39:13 + --> $DIR/multiple.rs:29:13 | -39 | #[spirv(position, vertex_index)] _diff_builtin: (), +29 | #[spirv(position, vertex_index)] _diff_builtin: (), | ^^^^^^^^ error: only one #[spirv(descriptor_set)] attribute is allowed on a function param - --> $DIR/multiple.rs:41:33 + --> $DIR/multiple.rs:31:33 | -41 | #[spirv(descriptor_set = 0, descriptor_set = 0)] _same_descriptor_set: (), +31 | #[spirv(descriptor_set = 0, descriptor_set = 0)] _same_descriptor_set: (), | ^^^^^^^^^^^^^^^^^^ | note: previous #[spirv(descriptor_set)] attribute - --> $DIR/multiple.rs:41:13 + --> $DIR/multiple.rs:31:13 | -41 | #[spirv(descriptor_set = 0, descriptor_set = 0)] _same_descriptor_set: (), +31 | #[spirv(descriptor_set = 0, descriptor_set = 0)] _same_descriptor_set: (), | ^^^^^^^^^^^^^^^^^^ error: only one #[spirv(descriptor_set)] attribute is allowed on a function param - --> $DIR/multiple.rs:42:33 + --> $DIR/multiple.rs:32:33 | -42 | #[spirv(descriptor_set = 0, descriptor_set = 1)] _diff_descriptor_set: (), +32 | #[spirv(descriptor_set = 0, descriptor_set = 1)] _diff_descriptor_set: (), | ^^^^^^^^^^^^^^^^^^ | note: previous #[spirv(descriptor_set)] attribute - --> $DIR/multiple.rs:42:13 + --> $DIR/multiple.rs:32:13 | -42 | #[spirv(descriptor_set = 0, descriptor_set = 1)] _diff_descriptor_set: (), +32 | #[spirv(descriptor_set = 0, descriptor_set = 1)] _diff_descriptor_set: (), | ^^^^^^^^^^^^^^^^^^ error: only one #[spirv(binding)] attribute is allowed on a function param - --> $DIR/multiple.rs:44:26 + --> $DIR/multiple.rs:34:26 | -44 | #[spirv(binding = 0, binding = 0)] _same_binding: (), +34 | #[spirv(binding = 0, binding = 0)] _same_binding: (), | ^^^^^^^^^^^ | note: previous #[spirv(binding)] attribute - --> $DIR/multiple.rs:44:13 + --> $DIR/multiple.rs:34:13 | -44 | #[spirv(binding = 0, binding = 0)] _same_binding: (), +34 | #[spirv(binding = 0, binding = 0)] _same_binding: (), | ^^^^^^^^^^^ error: only one #[spirv(binding)] attribute is allowed on a function param - --> $DIR/multiple.rs:45:26 + --> $DIR/multiple.rs:35:26 | -45 | #[spirv(binding = 0, binding = 1)] _diff_binding: (), +35 | #[spirv(binding = 0, binding = 1)] _diff_binding: (), | ^^^^^^^^^^^ | note: previous #[spirv(binding)] attribute - --> $DIR/multiple.rs:45:13 + --> $DIR/multiple.rs:35:13 | -45 | #[spirv(binding = 0, binding = 1)] _diff_binding: (), +35 | #[spirv(binding = 0, binding = 1)] _diff_binding: (), | ^^^^^^^^^^^ error: only one #[spirv(flat)] attribute is allowed on a function param - --> $DIR/multiple.rs:47:19 + --> $DIR/multiple.rs:37:19 | -47 | #[spirv(flat, flat)] _flat: (), +37 | #[spirv(flat, flat)] _flat: (), | ^^^^ | note: previous #[spirv(flat)] attribute - --> $DIR/multiple.rs:47:13 + --> $DIR/multiple.rs:37:13 | -47 | #[spirv(flat, flat)] _flat: (), +37 | #[spirv(flat, flat)] _flat: (), | ^^^^ error: only one #[spirv(invariant)] attribute is allowed on a function param - --> $DIR/multiple.rs:49:24 + --> $DIR/multiple.rs:39:24 | -49 | #[spirv(invariant, invariant)] _invariant: (), +39 | #[spirv(invariant, invariant)] _invariant: (), | ^^^^^^^^^ | note: previous #[spirv(invariant)] attribute - --> $DIR/multiple.rs:49:13 + --> $DIR/multiple.rs:39:13 | -49 | #[spirv(invariant, invariant)] _invariant: (), +39 | #[spirv(invariant, invariant)] _invariant: (), | ^^^^^^^^^ error: only one #[spirv(unroll_loops)] attribute is allowed on a function - --> $DIR/multiple.rs:53:23 + --> $DIR/multiple.rs:43:23 | -53 | #[spirv(unroll_loops, unroll_loops)] +43 | #[spirv(unroll_loops, unroll_loops)] | ^^^^^^^^^^^^ | note: previous #[spirv(unroll_loops)] attribute - --> $DIR/multiple.rs:53:9 + --> $DIR/multiple.rs:43:9 | -53 | #[spirv(unroll_loops, unroll_loops)] +43 | #[spirv(unroll_loops, unroll_loops)] | ^^^^^^^^^^^^ error: aborting due to 16 previous errors; 1 warning emitted