diff --git a/Cargo.lock b/Cargo.lock index fdc5a17b1c..13332727c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2793,6 +2793,7 @@ dependencies = [ "sanitize-filename", "smallvec", "spirt", + "spirv-std-types", "spirv-tools", "thorin-dwp", "tracing", diff --git a/crates/rustc_codegen_spirv/Cargo.toml b/crates/rustc_codegen_spirv/Cargo.toml index e08812d926..8f7b880855 100644 --- a/crates/rustc_codegen_spirv/Cargo.toml +++ b/crates/rustc_codegen_spirv/Cargo.toml @@ -50,6 +50,7 @@ either = "1.8.0" indexmap = "2.6.0" rspirv = "0.12" rustc_codegen_spirv-types.workspace = true +spirv-std-types = { workspace = true, features = ["std"] } rustc-demangle = "0.1.21" sanitize-filename = "0.6.0" smallvec = { version = "1.6.1", features = ["const_generics", "const_new", "union"] } diff --git a/crates/rustc_codegen_spirv/src/attr.rs b/crates/rustc_codegen_spirv/src/attr.rs index b35dbb6c3c..cc7f7b52fd 100644 --- a/crates/rustc_codegen_spirv/src/attr.rs +++ b/crates/rustc_codegen_spirv/src/attr.rs @@ -5,6 +5,7 @@ use crate::codegen_cx::CodegenCx; use crate::symbols::Symbols; use rspirv::spirv::{BuiltIn, ExecutionMode, ExecutionModel, StorageClass}; +use rustc_ast::{LitKind, MetaItemInner, MetaItemLit}; use rustc_hir as hir; use rustc_hir::def_id::LocalModDefId; use rustc_hir::intravisit::{self, Visitor}; @@ -12,7 +13,8 @@ use rustc_hir::{Attribute, CRATE_HIR_ID, HirId, MethodKind, Target}; use rustc_middle::hir::nested_filter; use rustc_middle::query::Providers; use rustc_middle::ty::TyCtxt; -use rustc_span::{Span, Symbol}; +use rustc_span::{Ident, Span, Symbol}; +use smallvec::SmallVec; use std::rc::Rc; // FIXME(eddyb) replace with `ArrayVec<[Word; 3]>`. @@ -152,7 +154,7 @@ impl AggregatedSpirvAttributes { // NOTE(eddyb) `span_delayed_bug` ensures that if attribute checking fails // to see an attribute error, it will cause an ICE instead. - for parse_attr_result in crate::symbols::parse_attrs_for_checking(&cx.sym, attrs) { + for parse_attr_result in parse_attrs_for_checking(&cx.sym, attrs) { let (span, parsed_attr) = match parse_attr_result { Ok(span_and_parsed_attr) => span_and_parsed_attr, Err((span, msg)) => { @@ -278,7 +280,7 @@ impl CheckSpirvAttrVisitor<'_> { fn check_spirv_attributes(&self, hir_id: HirId, target: Target) { let mut aggregated_attrs = AggregatedSpirvAttributes::default(); - let parse_attrs = |attrs| crate::symbols::parse_attrs_for_checking(&self.sym, attrs); + let parse_attrs = |attrs| parse_attrs_for_checking(&self.sym, attrs); let attrs = self.tcx.hir_attrs(hir_id); for parse_attr_result in parse_attrs(attrs) { @@ -512,3 +514,334 @@ pub(crate) fn provide(providers: &mut Providers) { ..*providers }; } + +// FIXME(eddyb) find something nicer for the error type. +type ParseAttrError = (Span, String); + +#[allow(clippy::get_first)] +fn parse_attrs_for_checking<'a>( + sym: &'a Symbols, + attrs: &'a [Attribute], +) -> impl Iterator> + 'a { + attrs + .iter() + .map(move |attr| { + // parse the #[rust_gpu::spirv(...)] attr and return the inner list + match attr { + Attribute::Unparsed(item) => { + // #[...] + let s = &item.path.segments; + if let Some(rust_gpu) = s.get(0) && rust_gpu.name == sym.rust_gpu { + // #[rust_gpu ...] + match s.get(1) { + Some(command) if command.name == sym.spirv_attr_with_version => { + // #[rust_gpu::spirv ...] + if let Some(args) = attr.meta_item_list() { + // #[rust_gpu::spirv(...)] + Ok(parse_spirv_attr(sym, args.iter())) + } else { + // #[rust_gpu::spirv] + Err(( + attr.span(), + "#[spirv(..)] attribute must have at least one argument" + .to_string(), + )) + } + } + _ => { + // #[rust_gpu::...] but not a know version + let spirv = sym.spirv_attr_with_version.as_str(); + Err(( + attr.span(), + format!("unknown `rust_gpu` attribute, expected `rust_gpu::{spirv}`. \ + Do the versions of `spirv-std` and `rustc_codegen_spirv` match?"), + )) + } + } + } else { + // #[...] but not #[rust_gpu ...] + Ok(Default::default()) + } + } + Attribute::Parsed(_) => Ok(Default::default()), + } + }) + .flat_map(|result| { + result + .unwrap_or_else(|err| SmallVec::from_iter([Err(err)])) + .into_iter() + }) +} + +fn parse_spirv_attr<'a>( + sym: &Symbols, + iter: impl Iterator, +) -> SmallVec<[Result<(Span, SpirvAttribute), ParseAttrError>; 4]> { + iter.map(|arg| { + let span = arg.span(); + 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)?) + } else if arg.has_name(sym.input_attachment_index) { + SpirvAttribute::InputAttachmentIndex(parse_attr_int_value(arg)?) + } else if arg.has_name(sym.spec_constant) { + SpirvAttribute::SpecConstant(parse_spec_constant_attr(sym, arg)?) + } else { + let name = match arg.ident() { + Some(i) => i, + None => { + return Err(( + span, + "#[spirv(..)] attribute argument must be single identifier".to_string(), + )); + } + }; + sym.attributes.get(&name.name).map_or_else( + || Err((name.span, "unknown argument to spirv attribute".to_string())), + |a| { + Ok(match a { + SpirvAttribute::Entry(entry) => SpirvAttribute::Entry( + parse_entry_attrs(sym, arg, &name, entry.execution_model)?, + ), + _ => a.clone(), + }) + }, + )? + }; + Ok((span, parsed_attr)) + }) + .collect() +} + +fn parse_spec_constant_attr( + sym: &Symbols, + arg: &MetaItemInner, +) -> Result { + let mut id = None; + let mut default = None; + + if let Some(attrs) = arg.meta_item_list() { + for attr in attrs { + if attr.has_name(sym.id) { + if id.is_none() { + id = Some(parse_attr_int_value(attr)?); + } else { + return Err((attr.span(), "`id` may only be specified once".into())); + } + } else if attr.has_name(sym.default) { + if default.is_none() { + default = Some(parse_attr_int_value(attr)?); + } else { + return Err((attr.span(), "`default` may only be specified once".into())); + } + } else { + return Err((attr.span(), "expected `id = ...` or `default = ...`".into())); + } + } + } + Ok(SpecConstant { + id: id.ok_or_else(|| (arg.span(), "expected `spec_constant(id = ...)`".into()))?, + default, + }) +} + +fn parse_attr_int_value(arg: &MetaItemInner) -> Result { + let arg = match arg.meta_item() { + Some(arg) => arg, + None => return Err((arg.span(), "attribute must have value".to_string())), + }; + match arg.name_value_literal() { + Some(&MetaItemLit { + kind: LitKind::Int(x, ..), + .. + }) if x <= u32::MAX as u128 => Ok(x.get() as u32), + _ => Err((arg.span, "attribute value must be integer".to_string())), + } +} + +fn parse_local_size_attr(arg: &MetaItemInner) -> Result<[u32; 3], ParseAttrError> { + let arg = match arg.meta_item() { + Some(arg) => arg, + None => return Err((arg.span(), "attribute must have value".to_string())), + }; + match arg.meta_item_list() { + Some(tuple) if !tuple.is_empty() && tuple.len() < 4 => { + let mut local_size = [1; 3]; + for (idx, lit) in tuple.iter().enumerate() { + match lit { + MetaItemInner::Lit(MetaItemLit { + kind: LitKind::Int(x, ..), + .. + }) if *x <= u32::MAX as u128 => local_size[idx] = x.get() as u32, + _ => return Err((lit.span(), "must be a u32 literal".to_string())), + } + } + Ok(local_size) + } + Some([]) => Err(( + arg.span, + "#[spirv(compute(threads(x, y, z)))] must have the x dimension specified, trailing ones may be elided".to_string(), + )), + Some(tuple) if tuple.len() > 3 => Err(( + arg.span, + "#[spirv(compute(threads(x, y, z)))] is three dimensional".to_string(), + )), + _ => Err(( + arg.span, + "#[spirv(compute(threads(x, y, z)))] must have 1 to 3 parameters, trailing ones may be elided".to_string(), + )), + } +} + +// for a given entry, gather up the additional attributes +// in this case ExecutionMode's, some have extra arguments +// others are specified with x, y, or z components +// ie #[spirv(fragment(origin_lower_left))] or #[spirv(gl_compute(local_size_x=64, local_size_y=8))] +fn parse_entry_attrs( + sym: &Symbols, + arg: &MetaItemInner, + name: &Ident, + execution_model: ExecutionModel, +) -> Result { + use ExecutionMode::*; + use ExecutionModel::*; + let mut entry = Entry::from(execution_model); + let mut origin_mode: Option = None; + let mut local_size: Option<[u32; 3]> = None; + let mut local_size_hint: Option<[u32; 3]> = None; + // Reserved + //let mut max_workgroup_size_intel: Option<[u32; 3]> = None; + if let Some(attrs) = arg.meta_item_list() { + for attr in attrs { + if let Some(attr_name) = attr.ident() { + if let Some((execution_mode, extra_dim)) = sym.execution_modes.get(&attr_name.name) + { + use crate::symbols::ExecutionModeExtraDim::*; + let val = match extra_dim { + None | Tuple => Option::None, + _ => Some(parse_attr_int_value(attr)?), + }; + match execution_mode { + OriginUpperLeft | OriginLowerLeft => { + origin_mode.replace(*execution_mode); + } + LocalSize => { + if local_size.is_none() { + local_size.replace(parse_local_size_attr(attr)?); + } else { + return Err(( + attr_name.span, + String::from( + "`#[spirv(compute(threads))]` may only be specified once", + ), + )); + } + } + LocalSizeHint => { + let val = val.unwrap(); + if local_size_hint.is_none() { + local_size_hint.replace([1, 1, 1]); + } + let local_size_hint = local_size_hint.as_mut().unwrap(); + match extra_dim { + X => { + local_size_hint[0] = val; + } + Y => { + local_size_hint[1] = val; + } + Z => { + local_size_hint[2] = val; + } + _ => unreachable!(), + } + } + // Reserved + /*MaxWorkgroupSizeINTEL => { + let val = val.unwrap(); + if max_workgroup_size_intel.is_none() { + max_workgroup_size_intel.replace([1, 1, 1]); + } + let max_workgroup_size_intel = max_workgroup_size_intel.as_mut() + .unwrap(); + match extra_dim { + X => { + max_workgroup_size_intel[0] = val; + }, + Y => { + max_workgroup_size_intel[1] = val; + }, + Z => { + max_workgroup_size_intel[2] = val; + }, + _ => unreachable!(), + } + },*/ + _ => { + if let Some(val) = val { + entry + .execution_modes + .push((*execution_mode, ExecutionModeExtra::new([val]))); + } else { + entry + .execution_modes + .push((*execution_mode, ExecutionModeExtra::new([]))); + } + } + } + } else if attr_name.name == sym.entry_point_name { + match attr.value_str() { + Some(sym) => { + entry.name = Some(sym); + } + None => { + return Err(( + attr_name.span, + format!( + "#[spirv({name}(..))] unknown attribute argument {attr_name}" + ), + )); + } + } + } else { + return Err(( + attr_name.span, + format!("#[spirv({name}(..))] unknown attribute argument {attr_name}",), + )); + } + } else { + return Err(( + arg.span(), + format!("#[spirv({name}(..))] attribute argument must be single identifier"), + )); + } + } + } + match entry.execution_model { + Fragment => { + let origin_mode = origin_mode.unwrap_or(OriginUpperLeft); + entry + .execution_modes + .push((origin_mode, ExecutionModeExtra::new([]))); + } + GLCompute | MeshNV | TaskNV | TaskEXT | MeshEXT => { + if let Some(local_size) = local_size { + entry + .execution_modes + .push((LocalSize, ExecutionModeExtra::new(local_size))); + } else { + return Err(( + arg.span(), + String::from( + "The `threads` argument must be specified when using `#[spirv(compute)]`, `#[spirv(mesh_nv)]`, `#[spirv(task_nv)]`, `#[spirv(task_ext)]` or `#[spirv(mesh_ext)]`", + ), + )); + } + } + //TODO: Cover more defaults + _ => {} + } + Ok(entry) +} diff --git a/crates/rustc_codegen_spirv/src/symbols.rs b/crates/rustc_codegen_spirv/src/symbols.rs index 4dfef5b4d3..917a61a86a 100644 --- a/crates/rustc_codegen_spirv/src/symbols.rs +++ b/crates/rustc_codegen_spirv/src/symbols.rs @@ -1,11 +1,9 @@ -use crate::attr::{Entry, ExecutionModeExtra, IntrinsicType, SpecConstant, SpirvAttribute}; +use crate::attr::{IntrinsicType, SpirvAttribute}; use crate::builder::libm_intrinsics; use rspirv::spirv::{BuiltIn, ExecutionMode, ExecutionModel, StorageClass}; -use rustc_ast::ast::{LitKind, MetaItemInner, MetaItemLit}; use rustc_data_structures::fx::FxHashMap; -use rustc_hir::Attribute; -use rustc_span::Span; -use rustc_span::symbol::{Ident, Symbol}; +use rustc_span::symbol::Symbol; +use spirv_std_types::spirv_attr_version::spirv_attr_with_version; use std::rc::Rc; /// Various places in the codebase (mostly attribute parsing) need to compare rustc Symbols to particular keywords. @@ -16,21 +14,21 @@ use std::rc::Rc; pub struct Symbols { pub discriminant: Symbol, pub rust_gpu: Symbol, - pub spirv: Symbol, + pub spirv_attr_with_version: Symbol, pub libm: Symbol, pub entry_point_name: Symbol, pub spv_khr_vulkan_memory_model: Symbol, - descriptor_set: Symbol, - binding: Symbol, - input_attachment_index: Symbol, + pub descriptor_set: Symbol, + pub binding: Symbol, + pub input_attachment_index: Symbol, - spec_constant: Symbol, - id: Symbol, - default: Symbol, + pub spec_constant: Symbol, + pub id: Symbol, + pub default: Symbol, - attributes: FxHashMap, - execution_modes: FxHashMap, + pub attributes: FxHashMap, + pub execution_modes: FxHashMap, pub libm_intrinsics: FxHashMap, } @@ -204,7 +202,7 @@ const EXECUTION_MODELS: &[(&str, ExecutionModel)] = { }; #[derive(Copy, Clone, Debug)] -enum ExecutionModeExtraDim { +pub enum ExecutionModeExtraDim { None, Value, X, @@ -407,7 +405,7 @@ impl Symbols { Self { discriminant: Symbol::intern("discriminant"), rust_gpu: Symbol::intern("rust_gpu"), - spirv: Symbol::intern("spirv"), + spirv_attr_with_version: Symbol::intern(&spirv_attr_with_version()), libm: Symbol::intern("libm"), entry_point_name: Symbol::intern("entry_point_name"), spv_khr_vulkan_memory_model: Symbol::intern("SPV_KHR_vulkan_memory_model"), @@ -436,321 +434,3 @@ impl Symbols { SYMBOLS.with(Rc::clone) } } - -// FIXME(eddyb) find something nicer for the error type. -type ParseAttrError = (Span, String); - -// FIXME(eddyb) maybe move this to `attr`? -pub(crate) fn parse_attrs_for_checking<'a>( - sym: &'a Symbols, - attrs: &'a [Attribute], -) -> impl Iterator> + 'a { - attrs.iter().flat_map(move |attr| { - let (whole_attr_error, args) = match attr { - Attribute::Unparsed(item) => { - // #[...] - let s = &item.path.segments; - if s.len() > 1 && s[0].name == sym.rust_gpu { - // #[rust_gpu ...] - if s.len() != 2 || s[1].name != sym.spirv { - // #[rust_gpu::...] but not #[rust_gpu::spirv] - ( - Some(Err(( - attr.span(), - "unknown `rust_gpu` attribute, expected `rust_gpu::spirv`" - .to_string(), - ))), - Default::default(), - ) - } else if let Some(args) = attr.meta_item_list() { - // #[rust_gpu::spirv(...)] - (None, args) - } else { - // #[rust_gpu::spirv] - ( - Some(Err(( - attr.span(), - "#[rust_gpu::spirv(..)] attribute must have at least one argument" - .to_string(), - ))), - Default::default(), - ) - } - } else { - // #[...] but not #[rust_gpu ...] - (None, Default::default()) - } - } - Attribute::Parsed(_) => (None, Default::default()), - }; - - whole_attr_error - .into_iter() - .chain(args.into_iter().map(move |ref arg| { - let span = arg.span(); - 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)?) - } else if arg.has_name(sym.input_attachment_index) { - SpirvAttribute::InputAttachmentIndex(parse_attr_int_value(arg)?) - } else if arg.has_name(sym.spec_constant) { - SpirvAttribute::SpecConstant(parse_spec_constant_attr(sym, arg)?) - } else { - let name = match arg.ident() { - Some(i) => i, - None => { - return Err(( - span, - "#[spirv(..)] attribute argument must be single identifier" - .to_string(), - )); - } - }; - sym.attributes.get(&name.name).map_or_else( - || Err((name.span, "unknown argument to spirv attribute".to_string())), - |a| { - Ok(match a { - SpirvAttribute::Entry(entry) => SpirvAttribute::Entry( - parse_entry_attrs(sym, arg, &name, entry.execution_model)?, - ), - _ => a.clone(), - }) - }, - )? - }; - Ok((span, parsed_attr)) - })) - }) -} - -fn parse_spec_constant_attr( - sym: &Symbols, - arg: &MetaItemInner, -) -> Result { - let mut id = None; - let mut default = None; - - if let Some(attrs) = arg.meta_item_list() { - for attr in attrs { - if attr.has_name(sym.id) { - if id.is_none() { - id = Some(parse_attr_int_value(attr)?); - } else { - return Err((attr.span(), "`id` may only be specified once".into())); - } - } else if attr.has_name(sym.default) { - if default.is_none() { - default = Some(parse_attr_int_value(attr)?); - } else { - return Err((attr.span(), "`default` may only be specified once".into())); - } - } else { - return Err((attr.span(), "expected `id = ...` or `default = ...`".into())); - } - } - } - Ok(SpecConstant { - id: id.ok_or_else(|| (arg.span(), "expected `spec_constant(id = ...)`".into()))?, - default, - }) -} - -fn parse_attr_int_value(arg: &MetaItemInner) -> Result { - let arg = match arg.meta_item() { - Some(arg) => arg, - None => return Err((arg.span(), "attribute must have value".to_string())), - }; - match arg.name_value_literal() { - Some(&MetaItemLit { - kind: LitKind::Int(x, ..), - .. - }) if x <= u32::MAX as u128 => Ok(x.get() as u32), - _ => Err((arg.span, "attribute value must be integer".to_string())), - } -} - -fn parse_local_size_attr(arg: &MetaItemInner) -> Result<[u32; 3], ParseAttrError> { - let arg = match arg.meta_item() { - Some(arg) => arg, - None => return Err((arg.span(), "attribute must have value".to_string())), - }; - match arg.meta_item_list() { - Some(tuple) if !tuple.is_empty() && tuple.len() < 4 => { - let mut local_size = [1; 3]; - for (idx, lit) in tuple.iter().enumerate() { - match lit { - MetaItemInner::Lit(MetaItemLit { - kind: LitKind::Int(x, ..), - .. - }) if *x <= u32::MAX as u128 => local_size[idx] = x.get() as u32, - _ => return Err((lit.span(), "must be a u32 literal".to_string())), - } - } - Ok(local_size) - } - Some([]) => Err(( - arg.span, - "#[spirv(compute(threads(x, y, z)))] must have the x dimension specified, trailing ones may be elided".to_string(), - )), - Some(tuple) if tuple.len() > 3 => Err(( - arg.span, - "#[spirv(compute(threads(x, y, z)))] is three dimensional".to_string(), - )), - _ => Err(( - arg.span, - "#[spirv(compute(threads(x, y, z)))] must have 1 to 3 parameters, trailing ones may be elided".to_string(), - )), - } -} - -// for a given entry, gather up the additional attributes -// in this case ExecutionMode's, some have extra arguments -// others are specified with x, y, or z components -// ie #[spirv(fragment(origin_lower_left))] or #[spirv(gl_compute(local_size_x=64, local_size_y=8))] -fn parse_entry_attrs( - sym: &Symbols, - arg: &MetaItemInner, - name: &Ident, - execution_model: ExecutionModel, -) -> Result { - use ExecutionMode::*; - use ExecutionModel::*; - let mut entry = Entry::from(execution_model); - let mut origin_mode: Option = None; - let mut local_size: Option<[u32; 3]> = None; - let mut local_size_hint: Option<[u32; 3]> = None; - // Reserved - //let mut max_workgroup_size_intel: Option<[u32; 3]> = None; - if let Some(attrs) = arg.meta_item_list() { - for attr in attrs { - if let Some(attr_name) = attr.ident() { - if let Some((execution_mode, extra_dim)) = sym.execution_modes.get(&attr_name.name) - { - use ExecutionModeExtraDim::*; - let val = match extra_dim { - None | Tuple => Option::None, - _ => Some(parse_attr_int_value(attr)?), - }; - match execution_mode { - OriginUpperLeft | OriginLowerLeft => { - origin_mode.replace(*execution_mode); - } - LocalSize => { - if local_size.is_none() { - local_size.replace(parse_local_size_attr(attr)?); - } else { - return Err(( - attr_name.span, - String::from( - "`#[spirv(compute(threads))]` may only be specified once", - ), - )); - } - } - LocalSizeHint => { - let val = val.unwrap(); - if local_size_hint.is_none() { - local_size_hint.replace([1, 1, 1]); - } - let local_size_hint = local_size_hint.as_mut().unwrap(); - match extra_dim { - X => { - local_size_hint[0] = val; - } - Y => { - local_size_hint[1] = val; - } - Z => { - local_size_hint[2] = val; - } - _ => unreachable!(), - } - } - // Reserved - /*MaxWorkgroupSizeINTEL => { - let val = val.unwrap(); - if max_workgroup_size_intel.is_none() { - max_workgroup_size_intel.replace([1, 1, 1]); - } - let max_workgroup_size_intel = max_workgroup_size_intel.as_mut() - .unwrap(); - match extra_dim { - X => { - max_workgroup_size_intel[0] = val; - }, - Y => { - max_workgroup_size_intel[1] = val; - }, - Z => { - max_workgroup_size_intel[2] = val; - }, - _ => unreachable!(), - } - },*/ - _ => { - if let Some(val) = val { - entry - .execution_modes - .push((*execution_mode, ExecutionModeExtra::new([val]))); - } else { - entry - .execution_modes - .push((*execution_mode, ExecutionModeExtra::new([]))); - } - } - } - } else if attr_name.name == sym.entry_point_name { - match attr.value_str() { - Some(sym) => { - entry.name = Some(sym); - } - None => { - return Err(( - attr_name.span, - format!( - "#[spirv({name}(..))] unknown attribute argument {attr_name}" - ), - )); - } - } - } else { - return Err(( - attr_name.span, - format!("#[spirv({name}(..))] unknown attribute argument {attr_name}",), - )); - } - } else { - return Err(( - arg.span(), - format!("#[spirv({name}(..))] attribute argument must be single identifier"), - )); - } - } - } - match entry.execution_model { - Fragment => { - let origin_mode = origin_mode.unwrap_or(OriginUpperLeft); - entry - .execution_modes - .push((origin_mode, ExecutionModeExtra::new([]))); - } - GLCompute | MeshNV | TaskNV | TaskEXT | MeshEXT => { - if let Some(local_size) = local_size { - entry - .execution_modes - .push((LocalSize, ExecutionModeExtra::new(local_size))); - } else { - return Err(( - arg.span(), - String::from( - "The `threads` argument must be specified when using `#[spirv(compute)]`, `#[spirv(mesh_nv)]`, `#[spirv(task_nv)]`, `#[spirv(task_ext)]` or `#[spirv(mesh_ext)]`", - ), - )); - } - } - //TODO: Cover more defaults - _ => {} - } - Ok(entry) -} diff --git a/crates/spirv-std/macros/Cargo.toml b/crates/spirv-std/macros/Cargo.toml index a9d0f0721f..8f11e49585 100644 --- a/crates/spirv-std/macros/Cargo.toml +++ b/crates/spirv-std/macros/Cargo.toml @@ -14,7 +14,7 @@ workspace = true proc-macro = true [dependencies] -spirv-std-types.workspace = true +spirv-std-types = { workspace = true, features = ["std"] } proc-macro2 = "1.0.24" quote = "1.0.8" syn = { version = "2.0.90", features = ["full", "visit-mut"] } diff --git a/crates/spirv-std/macros/src/lib.rs b/crates/spirv-std/macros/src/lib.rs index 671a15eb2c..504478b5ae 100644 --- a/crates/spirv-std/macros/src/lib.rs +++ b/crates/spirv-std/macros/src/lib.rs @@ -74,11 +74,12 @@ mod image; use proc_macro::TokenStream; -use proc_macro2::{Delimiter, Group, Span, TokenTree}; +use proc_macro2::{Delimiter, Group, Ident, Span, TokenTree}; use syn::{ImplItemFn, visit_mut::VisitMut}; -use quote::{ToTokens, quote}; +use quote::{ToTokens, TokenStreamExt, format_ident, quote}; +use spirv_std_types::spirv_attr_version::spirv_attr_with_version; use std::fmt::Write; /// A macro for creating SPIR-V `OpTypeImage` types. Always produces a @@ -144,45 +145,101 @@ pub fn Image(item: TokenStream) -> TokenStream { /// `#[cfg_attr(target_arch="spirv", rust_gpu::spirv(..))]`. #[proc_macro_attribute] pub fn spirv(attr: TokenStream, item: TokenStream) -> TokenStream { - let mut tokens: Vec = Vec::new(); + let spirv = format_ident!("{}", &spirv_attr_with_version()); // prepend with #[rust_gpu::spirv(..)] let attr: proc_macro2::TokenStream = attr.into(); - tokens.extend(quote! { #[cfg_attr(target_arch="spirv", rust_gpu::spirv(#attr))] }); + let mut tokens = quote! { #[cfg_attr(target_arch="spirv", rust_gpu::#spirv(#attr))] }; let item: proc_macro2::TokenStream = item.into(); for tt in item { match tt { TokenTree::Group(group) if group.delimiter() == Delimiter::Parenthesis => { - let mut sub_tokens = Vec::new(); + let mut group_tokens = proc_macro2::TokenStream::new(); + let mut last_token_hashtag = false; for tt in group.stream() { + let is_token_hashtag = + matches!(&tt, TokenTree::Punct(punct) if punct.as_char() == '#'); match tt { TokenTree::Group(group) if group.delimiter() == Delimiter::Bracket - && matches!(group.stream().into_iter().next(), Some(TokenTree::Ident(ident)) if ident == "spirv") - && matches!(sub_tokens.last(), Some(TokenTree::Punct(p)) if p.as_char() == '#') => + && last_token_hashtag + && matches!(group.stream().into_iter().next(), Some(TokenTree::Ident(ident)) if ident == "spirv") => { // group matches [spirv ...] - let inner = group.stream(); // group stream doesn't include the brackets - sub_tokens.extend( - quote! { [cfg_attr(target_arch="spirv", rust_gpu::#inner)] }, + // group stream doesn't include the brackets + let inner = group + .stream() + .into_iter() + .skip(1) + .collect::(); + group_tokens.extend( + quote! { [cfg_attr(target_arch="spirv", rust_gpu::#spirv #inner)] }, ); } - _ => sub_tokens.push(tt), + _ => group_tokens.append(tt), } + last_token_hashtag = is_token_hashtag; } - tokens.push(TokenTree::from(Group::new( - Delimiter::Parenthesis, - sub_tokens.into_iter().collect(), - ))); + let mut out = Group::new(Delimiter::Parenthesis, group_tokens); + out.set_span(group.span()); + tokens.append(out); } - _ => tokens.push(tt), + _ => tokens.append(tt), } } - tokens - .into_iter() - .collect::() - .into() + tokens.into() +} + +/// For testing only! Is not reexported in `spirv-std`, but reachable via +/// `spirv_std::macros::spirv_recursive_for_testing`. +/// +/// May be more expensive than plain `spirv`, since we're checking a lot more symbols. So I've opted to +/// have this be a separate macro, instead of modifying the standard `spirv` one. +#[proc_macro_attribute] +pub fn spirv_recursive_for_testing(attr: TokenStream, item: TokenStream) -> TokenStream { + fn recurse(spirv: &Ident, stream: proc_macro2::TokenStream) -> proc_macro2::TokenStream { + let mut last_token_hashtag = false; + stream.into_iter().map(|tt| { + let mut is_token_hashtag = false; + let out = match tt { + TokenTree::Group(group) + if group.delimiter() == Delimiter::Bracket + && last_token_hashtag + && matches!(group.stream().into_iter().next(), Some(TokenTree::Ident(ident)) if ident == "spirv") => + { + // group matches [spirv ...] + // group stream doesn't include the brackets + let inner = group + .stream() + .into_iter() + .skip(1) + .collect::(); + quote! { [cfg_attr(target_arch="spirv", rust_gpu::#spirv #inner)] } + }, + TokenTree::Group(group) => { + let mut out = Group::new(group.delimiter(), recurse(spirv, group.stream())); + out.set_span(group.span()); + TokenTree::Group(out).into() + }, + TokenTree::Punct(punct) => { + is_token_hashtag = punct.as_char() == '#'; + TokenTree::Punct(punct).into() + } + tt => tt.into(), + }; + last_token_hashtag = is_token_hashtag; + out + }).collect() + } + + let attr: proc_macro2::TokenStream = attr.into(); + let item: proc_macro2::TokenStream = item.into(); + + // prepend with #[rust_gpu::spirv(..)] + let spirv = format_ident!("{}", &spirv_attr_with_version()); + let inner = recurse(&spirv, item); + quote! { #[cfg_attr(target_arch="spirv", rust_gpu::#spirv(#attr))] #inner }.into() } /// Marks a function as runnable only on the GPU, and will panic on diff --git a/crates/spirv-std/shared/Cargo.toml b/crates/spirv-std/shared/Cargo.toml index 2c128f1f28..396f3e529b 100644 --- a/crates/spirv-std/shared/Cargo.toml +++ b/crates/spirv-std/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spirv-std-types" -description = "SPIR-V types shared between spirv-std and spirv-std-macros" +description = "SPIR-V types shared between spirv-std, spirv-std-macros and rustc_codegen_spirv" version.workspace = true authors.workspace = true edition.workspace = true @@ -9,3 +9,6 @@ repository.workspace = true [lints] workspace = true + +[features] +std = [] diff --git a/crates/spirv-std/shared/README.md b/crates/spirv-std/shared/README.md index 74652d3624..ae8f40b932 100644 --- a/crates/spirv-std/shared/README.md +++ b/crates/spirv-std/shared/README.md @@ -1,3 +1,5 @@ # `spirv-std-types` -Small shared crate, to share definitions between [`spirv-std`](https://docs.rs/spirv-std/) and [`spirv-std-macros`](https://docs.rs/spirv-std-macros/). Please refer to [`spirv-std`](https://docs.rs/spirv-std/) for more information. +Small shared crate, to share definitions between [`spirv-std`](https://docs.rs/spirv-std/), [`spirv-std-macros`](https://docs.rs/spirv-std-macros/) and [`rustc_codegen_spirv`](https://docs.rs/rustc_codegen_spirv/). Should only contain symbols that compile in a `no_std` context. + +Please refer to [`spirv-std`](https://docs.rs/spirv-std/) for more information. diff --git a/crates/spirv-std/shared/src/lib.rs b/crates/spirv-std/shared/src/lib.rs index 772e3d231e..d3078c1fcf 100644 --- a/crates/spirv-std/shared/src/lib.rs +++ b/crates/spirv-std/shared/src/lib.rs @@ -1,4 +1,6 @@ #![doc = include_str!("../README.md")] -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] pub mod image_params; +#[cfg(feature = "std")] +pub mod spirv_attr_version; diff --git a/crates/spirv-std/shared/src/spirv_attr_version.rs b/crates/spirv-std/shared/src/spirv_attr_version.rs new file mode 100644 index 0000000000..c84c33f2d9 --- /dev/null +++ b/crates/spirv-std/shared/src/spirv_attr_version.rs @@ -0,0 +1,18 @@ +/// Returns the `spirv` attribute name with version tag. +/// +/// The `#[spirv()]` attribute in `spirv_std` expands to this spirv attribute name, +/// including the version of `spirv_std`. `rustc_codegen_spirv` verifies that the +/// version matches with the codegen backend, to prevent accidental mismatches. +/// +/// ```no_run +/// # use spirv_std_types::spirv_attr_version::spirv_attr_with_version; +/// let spirv = spirv_attr_with_version(); +/// let attr = format!("#[rust_gpu::{spirv}(vertex)]"); +/// // version here may be out-of-date +/// assert_eq!("#[rust_gpu::spirv_v0_9(vertex)]", attr); +/// ``` +pub fn spirv_attr_with_version() -> String { + let major: u32 = env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(); + let minor: u32 = env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(); + format!("spirv_v{major}_{minor}") +} diff --git a/tests/compiletests/ui/spirv-attr/invalid-target.rs b/tests/compiletests/ui/spirv-attr/invalid-target.rs index 2dbd5bb106..e2677b42dc 100644 --- a/tests/compiletests/ui/spirv-attr/invalid-target.rs +++ b/tests/compiletests/ui/spirv-attr/invalid-target.rs @@ -29,9 +29,12 @@ // * `_fn` // * 6 on `_entry_param` -// NOTE(shesp) Directly using `#[rust_gpu::spirv(...)]` because macro attributes are invalid in most contexts +// NOTE(firestar99) Using the custom-made `#[spirv_recursive_for_testing(...)]` which expands recursively, +// unlike #[spirv()] which tries to expand as little code as possible for compile performance reasons. -#[rust_gpu::spirv( +use spirv_std::macros::spirv_recursive_for_testing; + +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -40,48 +43,48 @@ macro_rules! _macro { () => {}; } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] extern crate spirv_std as _; -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] use spirv_std as _; -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] mod _mod {} -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] extern "C" { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] type _ForeignTy; - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] static _FOREIGN_STATIC: (); - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -89,28 +92,28 @@ extern "C" { fn _foreign_fn(); } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] static _STATIC: () = (); -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] const _CONST: () = (); -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] type _TyAlias = (); -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -121,19 +124,19 @@ fn _opaque_ty_definer() -> _OpaqueTy { () } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] enum _Enum { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] _Variant { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -142,13 +145,13 @@ enum _Enum { }, } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] union _Union { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -156,12 +159,12 @@ union _Union { _field: (), } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] struct _Struct { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -169,113 +172,113 @@ struct _Struct { _field: (), } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] impl _Struct { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] const _INHERENT_ASSOC_CONST: () = (); - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _inherent_method() {} } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] trait _TraitAlias = Copy; -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] trait _Trait { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] type _AssocTy; - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] const _TRAIT_ASSOC_CONST: (); - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _trait_method(); - #[rust_gpu::spirv( + #[spirv( 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() {} } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] impl _Trait for () { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] type _AssocTy = (); - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] const _TRAIT_ASSOC_CONST: () = (); - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _trait_method() {} } -#[rust_gpu::spirv( +#[spirv_recursive_for_testing( sampler, block, sampled_image, generic_image_type, // struct-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] fn _fn( - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only )] _entry_param: (), ) { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] let _statement = (); - let _closure = #[rust_gpu::spirv( + let _closure = #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -283,7 +286,7 @@ fn _fn( || {}; ( - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -293,7 +296,7 @@ fn _fn( ); match () { - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only @@ -302,18 +305,19 @@ fn _fn( } } +#[spirv_recursive_for_testing()] fn _fn_with_generics< - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] '_lifetime_param, - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only )] _TyParam, - #[rust_gpu::spirv( + #[spirv( sampler, block, sampled_image, generic_image_type, // struct-only vertex, // fn-only uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only diff --git a/tests/compiletests/ui/spirv-attr/invalid-target.stderr b/tests/compiletests/ui/spirv-attr/invalid-target.stderr index 842d832503..78ae3de546 100644 --- a/tests/compiletests/ui/spirv-attr/invalid-target.stderr +++ b/tests/compiletests/ui/spirv-attr/invalid-target.stderr @@ -1,2650 +1,2650 @@ error: attribute is only valid on a struct, not on a macro def - --> $DIR/invalid-target.rs:35:5 + --> $DIR/invalid-target.rs:38:5 | -35 | sampler, block, sampled_image, generic_image_type, // struct-only +38 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a macro def - --> $DIR/invalid-target.rs:35:14 + --> $DIR/invalid-target.rs:38:14 | -35 | sampler, block, sampled_image, generic_image_type, // struct-only +38 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a macro def - --> $DIR/invalid-target.rs:35:21 + --> $DIR/invalid-target.rs:38:21 | -35 | sampler, block, sampled_image, generic_image_type, // struct-only +38 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a macro def - --> $DIR/invalid-target.rs:35:36 + --> $DIR/invalid-target.rs:38:36 | -35 | sampler, block, sampled_image, generic_image_type, // struct-only +38 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a macro def - --> $DIR/invalid-target.rs:36:5 + --> $DIR/invalid-target.rs:39:5 | -36 | vertex, // fn-only +39 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a macro def - --> $DIR/invalid-target.rs:37:5 + --> $DIR/invalid-target.rs:40:5 | -37 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +40 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a macro def - --> $DIR/invalid-target.rs:37:14 + --> $DIR/invalid-target.rs:40:14 | -37 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +40 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a macro def - --> $DIR/invalid-target.rs:37:24 + --> $DIR/invalid-target.rs:40:24 | -37 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +40 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a macro def - --> $DIR/invalid-target.rs:37:44 + --> $DIR/invalid-target.rs:40:44 | -37 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +40 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a macro def - --> $DIR/invalid-target.rs:37:57 + --> $DIR/invalid-target.rs:40:57 | -37 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +40 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a macro def - --> $DIR/invalid-target.rs:37:63 + --> $DIR/invalid-target.rs:40:63 | -37 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +40 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a extern crate - --> $DIR/invalid-target.rs:44:5 + --> $DIR/invalid-target.rs:47:5 | -44 | sampler, block, sampled_image, generic_image_type, // struct-only +47 | 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:44:14 + --> $DIR/invalid-target.rs:47:14 | -44 | sampler, block, sampled_image, generic_image_type, // struct-only +47 | 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:44:21 + --> $DIR/invalid-target.rs:47:21 | -44 | sampler, block, sampled_image, generic_image_type, // struct-only +47 | 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:44:36 + --> $DIR/invalid-target.rs:47:36 | -44 | sampler, block, sampled_image, generic_image_type, // struct-only +47 | 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:45:5 + --> $DIR/invalid-target.rs:48:5 | -45 | vertex, // fn-only +48 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a extern crate - --> $DIR/invalid-target.rs:46:5 + --> $DIR/invalid-target.rs:49:5 | -46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +49 | 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:46:14 + --> $DIR/invalid-target.rs:49:14 | -46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +49 | 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:46:24 + --> $DIR/invalid-target.rs:49:24 | -46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +49 | 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:46:44 + --> $DIR/invalid-target.rs:49:44 | -46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +49 | 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:46:57 + --> $DIR/invalid-target.rs:49:57 | -46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +49 | 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:46:63 + --> $DIR/invalid-target.rs:49:63 | -46 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +49 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a use - --> $DIR/invalid-target.rs:51:5 + --> $DIR/invalid-target.rs:54:5 | -51 | sampler, block, sampled_image, generic_image_type, // struct-only +54 | 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:51:14 + --> $DIR/invalid-target.rs:54:14 | -51 | sampler, block, sampled_image, generic_image_type, // struct-only +54 | 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:51:21 + --> $DIR/invalid-target.rs:54:21 | -51 | sampler, block, sampled_image, generic_image_type, // struct-only +54 | 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:51:36 + --> $DIR/invalid-target.rs:54:36 | -51 | sampler, block, sampled_image, generic_image_type, // struct-only +54 | 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:52:5 + --> $DIR/invalid-target.rs:55:5 | -52 | vertex, // fn-only +55 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a use - --> $DIR/invalid-target.rs:53:5 + --> $DIR/invalid-target.rs:56:5 | -53 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +56 | 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:53:14 + --> $DIR/invalid-target.rs:56:14 | -53 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +56 | 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:53:24 + --> $DIR/invalid-target.rs:56:24 | -53 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +56 | 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:53:44 + --> $DIR/invalid-target.rs:56:44 | -53 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +56 | 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:53:57 + --> $DIR/invalid-target.rs:56:57 | -53 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +56 | 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:53:63 + --> $DIR/invalid-target.rs:56:63 | -53 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +56 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a module - --> $DIR/invalid-target.rs:58:5 + --> $DIR/invalid-target.rs:61:5 | -58 | sampler, block, sampled_image, generic_image_type, // struct-only +61 | 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:58:14 + --> $DIR/invalid-target.rs:61:14 | -58 | sampler, block, sampled_image, generic_image_type, // struct-only +61 | 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:58:21 + --> $DIR/invalid-target.rs:61:21 | -58 | sampler, block, sampled_image, generic_image_type, // struct-only +61 | 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:58:36 + --> $DIR/invalid-target.rs:61:36 | -58 | sampler, block, sampled_image, generic_image_type, // struct-only +61 | 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:59:5 + --> $DIR/invalid-target.rs:62:5 | -59 | vertex, // fn-only +62 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a module - --> $DIR/invalid-target.rs:60:5 + --> $DIR/invalid-target.rs:63:5 | -60 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +63 | 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:60:14 + --> $DIR/invalid-target.rs:63:14 | -60 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +63 | 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:60:24 + --> $DIR/invalid-target.rs:63:24 | -60 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +63 | 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:60:44 + --> $DIR/invalid-target.rs:63:44 | -60 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +63 | 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:60:57 + --> $DIR/invalid-target.rs:63:57 | -60 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +63 | 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:60:63 + --> $DIR/invalid-target.rs:63:63 | -60 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +63 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign module - --> $DIR/invalid-target.rs:65:5 + --> $DIR/invalid-target.rs:68:5 | -65 | sampler, block, sampled_image, generic_image_type, // struct-only +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:65:14 + --> $DIR/invalid-target.rs:68:14 | -65 | sampler, block, sampled_image, generic_image_type, // struct-only +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:65:21 + --> $DIR/invalid-target.rs:68:21 | -65 | sampler, block, sampled_image, generic_image_type, // struct-only +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:65:36 + --> $DIR/invalid-target.rs:68:36 | -65 | sampler, block, sampled_image, generic_image_type, // struct-only +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:66:5 + --> $DIR/invalid-target.rs:69:5 | -66 | 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:67:5 + --> $DIR/invalid-target.rs:70:5 | -67 | 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:67:14 + --> $DIR/invalid-target.rs:70:14 | -67 | 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:67:24 + --> $DIR/invalid-target.rs:70:24 | -67 | 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:67:44 + --> $DIR/invalid-target.rs:70:44 | -67 | 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:67:57 + --> $DIR/invalid-target.rs:70:57 | -67 | 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:67:63 + --> $DIR/invalid-target.rs:70:63 | -67 | 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 struct, not on a static item - --> $DIR/invalid-target.rs:93:5 + --> $DIR/invalid-target.rs:96:5 | -93 | sampler, block, sampled_image, generic_image_type, // struct-only +96 | 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:93:14 + --> $DIR/invalid-target.rs:96:14 | -93 | sampler, block, sampled_image, generic_image_type, // struct-only +96 | 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:93:21 + --> $DIR/invalid-target.rs:96:21 | -93 | sampler, block, sampled_image, generic_image_type, // struct-only +96 | 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:93:36 + --> $DIR/invalid-target.rs:96:36 | -93 | sampler, block, sampled_image, generic_image_type, // struct-only +96 | 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:94:5 + --> $DIR/invalid-target.rs:97:5 | -94 | vertex, // fn-only +97 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a static item - --> $DIR/invalid-target.rs:95:5 + --> $DIR/invalid-target.rs:98:5 | -95 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +98 | 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:95:14 + --> $DIR/invalid-target.rs:98:14 | -95 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +98 | 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:95:24 + --> $DIR/invalid-target.rs:98:24 | -95 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +98 | 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:95:44 + --> $DIR/invalid-target.rs:98:44 | -95 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +98 | 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:95:57 + --> $DIR/invalid-target.rs:98:57 | -95 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +98 | 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:95:63 + --> $DIR/invalid-target.rs:98:63 | -95 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +98 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a constant item - --> $DIR/invalid-target.rs:100:5 + --> $DIR/invalid-target.rs:103:5 | -100 | sampler, block, sampled_image, generic_image_type, // struct-only +103 | 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:100:14 + --> $DIR/invalid-target.rs:103:14 | -100 | sampler, block, sampled_image, generic_image_type, // struct-only +103 | 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:100:21 + --> $DIR/invalid-target.rs:103:21 | -100 | sampler, block, sampled_image, generic_image_type, // struct-only +103 | 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:100:36 + --> $DIR/invalid-target.rs:103:36 | -100 | sampler, block, sampled_image, generic_image_type, // struct-only +103 | 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:101:5 + --> $DIR/invalid-target.rs:104:5 | -101 | vertex, // fn-only +104 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a constant item - --> $DIR/invalid-target.rs:102:5 + --> $DIR/invalid-target.rs:105:5 | -102 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +105 | 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:102:14 + --> $DIR/invalid-target.rs:105:14 | -102 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +105 | 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:102:24 + --> $DIR/invalid-target.rs:105:24 | -102 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +105 | 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:102:44 + --> $DIR/invalid-target.rs:105:44 | -102 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +105 | 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:102:57 + --> $DIR/invalid-target.rs:105:57 | -102 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +105 | 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:102:63 + --> $DIR/invalid-target.rs:105:63 | -102 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +105 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:107:5 + --> $DIR/invalid-target.rs:110:5 | -107 | sampler, block, sampled_image, generic_image_type, // struct-only +110 | 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:107:14 + --> $DIR/invalid-target.rs:110:14 | -107 | sampler, block, sampled_image, generic_image_type, // struct-only +110 | 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:107:21 + --> $DIR/invalid-target.rs:110:21 | -107 | sampler, block, sampled_image, generic_image_type, // struct-only +110 | 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:107:36 + --> $DIR/invalid-target.rs:110:36 | -107 | sampler, block, sampled_image, generic_image_type, // struct-only +110 | 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:108:5 + --> $DIR/invalid-target.rs:111:5 | -108 | vertex, // fn-only +111 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:109:5 + --> $DIR/invalid-target.rs:112:5 | -109 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +112 | 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:109:14 + --> $DIR/invalid-target.rs:112:14 | -109 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +112 | 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:109:24 + --> $DIR/invalid-target.rs:112:24 | -109 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +112 | 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:109:44 + --> $DIR/invalid-target.rs:112:44 | -109 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +112 | 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:109:57 + --> $DIR/invalid-target.rs:112:57 | -109 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +112 | 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:109:63 + --> $DIR/invalid-target.rs:112:63 | -109 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +112 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a type alias - --> $DIR/invalid-target.rs:114:5 + --> $DIR/invalid-target.rs:117:5 | -114 | sampler, block, sampled_image, generic_image_type, // struct-only +117 | 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:114:14 + --> $DIR/invalid-target.rs:117:14 | -114 | sampler, block, sampled_image, generic_image_type, // struct-only +117 | 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:114:21 + --> $DIR/invalid-target.rs:117:21 | -114 | sampler, block, sampled_image, generic_image_type, // struct-only +117 | 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:114:36 + --> $DIR/invalid-target.rs:117:36 | -114 | sampler, block, sampled_image, generic_image_type, // struct-only +117 | 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:115:5 + --> $DIR/invalid-target.rs:118:5 | -115 | vertex, // fn-only +118 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a type alias - --> $DIR/invalid-target.rs:116:5 + --> $DIR/invalid-target.rs:119:5 | -116 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +119 | 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:116:14 + --> $DIR/invalid-target.rs:119:14 | -116 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +119 | 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:116:24 + --> $DIR/invalid-target.rs:119:24 | -116 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +119 | 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:116:44 + --> $DIR/invalid-target.rs:119:44 | -116 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +119 | 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:116:57 + --> $DIR/invalid-target.rs:119:57 | -116 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +119 | 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:116:63 + --> $DIR/invalid-target.rs:119:63 | -116 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +119 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a enum - --> $DIR/invalid-target.rs:125:5 + --> $DIR/invalid-target.rs:128:5 | -125 | sampler, block, sampled_image, generic_image_type, // struct-only +128 | 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:125:14 + --> $DIR/invalid-target.rs:128:14 | -125 | sampler, block, sampled_image, generic_image_type, // struct-only +128 | 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:125:21 + --> $DIR/invalid-target.rs:128:21 | -125 | sampler, block, sampled_image, generic_image_type, // struct-only +128 | 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:125:36 + --> $DIR/invalid-target.rs:128:36 | -125 | sampler, block, sampled_image, generic_image_type, // struct-only +128 | 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:126:5 + --> $DIR/invalid-target.rs:129:5 | -126 | vertex, // fn-only +129 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a enum - --> $DIR/invalid-target.rs:127:5 + --> $DIR/invalid-target.rs:130:5 | -127 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +130 | 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:127:14 + --> $DIR/invalid-target.rs:130:14 | -127 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +130 | 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:127:24 + --> $DIR/invalid-target.rs:130:24 | -127 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +130 | 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:127:44 + --> $DIR/invalid-target.rs:130:44 | -127 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +130 | 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:127:57 + --> $DIR/invalid-target.rs:130:57 | -127 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +130 | 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:127:63 + --> $DIR/invalid-target.rs:130:63 | -127 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +130 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a enum variant - --> $DIR/invalid-target.rs:131:9 + --> $DIR/invalid-target.rs:134:9 | -131 | sampler, block, sampled_image, generic_image_type, // struct-only +134 | 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:131:18 + --> $DIR/invalid-target.rs:134:18 | -131 | sampler, block, sampled_image, generic_image_type, // struct-only +134 | 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:131:25 + --> $DIR/invalid-target.rs:134:25 | -131 | sampler, block, sampled_image, generic_image_type, // struct-only +134 | 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:131:40 + --> $DIR/invalid-target.rs:134:40 | -131 | sampler, block, sampled_image, generic_image_type, // struct-only +134 | 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:132:9 + --> $DIR/invalid-target.rs:135:9 | -132 | vertex, // fn-only +135 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a enum variant - --> $DIR/invalid-target.rs:133:9 + --> $DIR/invalid-target.rs:136:9 | -133 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +136 | 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:133:18 + --> $DIR/invalid-target.rs:136:18 | -133 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +136 | 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:133:28 + --> $DIR/invalid-target.rs:136:28 | -133 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +136 | 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:133:48 + --> $DIR/invalid-target.rs:136:48 | -133 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +136 | 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:133:61 + --> $DIR/invalid-target.rs:136:61 | -133 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +136 | 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:133:67 + --> $DIR/invalid-target.rs:136:67 | -133 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +136 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:137:13 + --> $DIR/invalid-target.rs:140:13 | -137 | sampler, block, sampled_image, generic_image_type, // struct-only +140 | 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:137:22 + --> $DIR/invalid-target.rs:140:22 | -137 | sampler, block, sampled_image, generic_image_type, // struct-only +140 | 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:137:29 + --> $DIR/invalid-target.rs:140:29 | -137 | sampler, block, sampled_image, generic_image_type, // struct-only +140 | 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:137:44 + --> $DIR/invalid-target.rs:140:44 | -137 | sampler, block, sampled_image, generic_image_type, // struct-only +140 | 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:138:13 + --> $DIR/invalid-target.rs:141:13 | -138 | vertex, // fn-only +141 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:139:13 + --> $DIR/invalid-target.rs:142:13 | -139 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +142 | 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:139:22 + --> $DIR/invalid-target.rs:142:22 | -139 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +142 | 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:139:32 + --> $DIR/invalid-target.rs:142:32 | -139 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +142 | 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:139:52 + --> $DIR/invalid-target.rs:142:52 | -139 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +142 | 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:139:65 + --> $DIR/invalid-target.rs:142:65 | -139 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +142 | 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:139:71 + --> $DIR/invalid-target.rs:142:71 | -139 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +142 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a union - --> $DIR/invalid-target.rs:146:5 + --> $DIR/invalid-target.rs:149:5 | -146 | sampler, block, sampled_image, generic_image_type, // struct-only +149 | 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:146:14 + --> $DIR/invalid-target.rs:149:14 | -146 | sampler, block, sampled_image, generic_image_type, // struct-only +149 | 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:146:21 + --> $DIR/invalid-target.rs:149:21 | -146 | sampler, block, sampled_image, generic_image_type, // struct-only +149 | 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:146:36 + --> $DIR/invalid-target.rs:149:36 | -146 | sampler, block, sampled_image, generic_image_type, // struct-only +149 | 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:147:5 + --> $DIR/invalid-target.rs:150:5 | -147 | vertex, // fn-only +150 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a union - --> $DIR/invalid-target.rs:148:5 + --> $DIR/invalid-target.rs:151:5 | -148 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +151 | 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:148:14 + --> $DIR/invalid-target.rs:151:14 | -148 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +151 | 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:148:24 + --> $DIR/invalid-target.rs:151:24 | -148 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +151 | 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:148:44 + --> $DIR/invalid-target.rs:151:44 | -148 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +151 | 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:148:57 + --> $DIR/invalid-target.rs:151:57 | -148 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +151 | 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:148:63 + --> $DIR/invalid-target.rs:151:63 | -148 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +151 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:152:9 + --> $DIR/invalid-target.rs:155:9 | -152 | sampler, block, sampled_image, generic_image_type, // struct-only +155 | 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:152:18 + --> $DIR/invalid-target.rs:155:18 | -152 | sampler, block, sampled_image, generic_image_type, // struct-only +155 | 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:152:25 + --> $DIR/invalid-target.rs:155:25 | -152 | sampler, block, sampled_image, generic_image_type, // struct-only +155 | 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:152:40 + --> $DIR/invalid-target.rs:155:40 | -152 | sampler, block, sampled_image, generic_image_type, // struct-only +155 | 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:153:9 + --> $DIR/invalid-target.rs:156:9 | -153 | vertex, // fn-only +156 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:154:9 + --> $DIR/invalid-target.rs:157:9 | -154 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +157 | 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:154:18 + --> $DIR/invalid-target.rs:157:18 | -154 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +157 | 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:154:28 + --> $DIR/invalid-target.rs:157:28 | -154 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +157 | 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:154:48 + --> $DIR/invalid-target.rs:157:48 | -154 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +157 | 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:154:61 + --> $DIR/invalid-target.rs:157:61 | -154 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +157 | 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:154:67 + --> $DIR/invalid-target.rs:157:67 | -154 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +157 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a function, not on a struct - --> $DIR/invalid-target.rs:160:5 + --> $DIR/invalid-target.rs:163:5 | -160 | vertex, // fn-only +163 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct - --> $DIR/invalid-target.rs:161:5 + --> $DIR/invalid-target.rs:164:5 | -161 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +164 | 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:161:14 + --> $DIR/invalid-target.rs:164:14 | -161 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +164 | 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:161:24 + --> $DIR/invalid-target.rs:164:24 | -161 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +164 | 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:161:44 + --> $DIR/invalid-target.rs:164:44 | -161 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +164 | 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:161:57 + --> $DIR/invalid-target.rs:164:57 | -161 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +164 | 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:161:63 + --> $DIR/invalid-target.rs:164:63 | -161 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +164 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a struct field - --> $DIR/invalid-target.rs:165:9 + --> $DIR/invalid-target.rs:168:9 | -165 | sampler, block, sampled_image, generic_image_type, // struct-only +168 | 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:18 + --> $DIR/invalid-target.rs:168:18 | -165 | sampler, block, sampled_image, generic_image_type, // struct-only +168 | 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:25 + --> $DIR/invalid-target.rs:168:25 | -165 | sampler, block, sampled_image, generic_image_type, // struct-only +168 | 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:40 + --> $DIR/invalid-target.rs:168:40 | -165 | sampler, block, sampled_image, generic_image_type, // struct-only +168 | 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:9 + --> $DIR/invalid-target.rs:169:9 | -166 | vertex, // fn-only +169 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a struct field - --> $DIR/invalid-target.rs:167:9 + --> $DIR/invalid-target.rs:170:9 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +170 | 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:18 + --> $DIR/invalid-target.rs:170:18 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +170 | 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:28 + --> $DIR/invalid-target.rs:170:28 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +170 | 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:48 + --> $DIR/invalid-target.rs:170:48 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +170 | 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:61 + --> $DIR/invalid-target.rs:170:61 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +170 | 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:67 + --> $DIR/invalid-target.rs:170:67 | -167 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +170 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:173:5 + --> $DIR/invalid-target.rs:176:5 | -173 | sampler, block, sampled_image, generic_image_type, // struct-only +176 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:173:14 + --> $DIR/invalid-target.rs:176:14 | -173 | sampler, block, sampled_image, generic_image_type, // struct-only +176 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:173:21 + --> $DIR/invalid-target.rs:176:21 | -173 | sampler, block, sampled_image, generic_image_type, // struct-only +176 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:173:36 + --> $DIR/invalid-target.rs:176:36 | -173 | sampler, block, sampled_image, generic_image_type, // struct-only +176 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a implementation block - --> $DIR/invalid-target.rs:174:5 + --> $DIR/invalid-target.rs:177:5 | -174 | vertex, // fn-only +177 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:175:5 + --> $DIR/invalid-target.rs:178:5 | -175 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:175:14 + --> $DIR/invalid-target.rs:178:14 | -175 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:175:24 + --> $DIR/invalid-target.rs:178:24 | -175 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:175:44 + --> $DIR/invalid-target.rs:178:44 | -175 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:175:57 + --> $DIR/invalid-target.rs:178:57 | -175 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:175:63 + --> $DIR/invalid-target.rs:178:63 | -175 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +178 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a trait alias - --> $DIR/invalid-target.rs:193:5 + --> $DIR/invalid-target.rs:196:5 | -193 | sampler, block, sampled_image, generic_image_type, // struct-only +196 | 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:193:14 + --> $DIR/invalid-target.rs:196:14 | -193 | sampler, block, sampled_image, generic_image_type, // struct-only +196 | 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:193:21 + --> $DIR/invalid-target.rs:196:21 | -193 | sampler, block, sampled_image, generic_image_type, // struct-only +196 | 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:193:36 + --> $DIR/invalid-target.rs:196:36 | -193 | sampler, block, sampled_image, generic_image_type, // struct-only +196 | 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:194:5 + --> $DIR/invalid-target.rs:197:5 | -194 | vertex, // fn-only +197 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a trait alias - --> $DIR/invalid-target.rs:195:5 + --> $DIR/invalid-target.rs:198:5 | -195 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +198 | 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:195:14 + --> $DIR/invalid-target.rs:198:14 | -195 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +198 | 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:195:24 + --> $DIR/invalid-target.rs:198:24 | -195 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +198 | 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:195:44 + --> $DIR/invalid-target.rs:198:44 | -195 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +198 | 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:195:57 + --> $DIR/invalid-target.rs:198:57 | -195 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +198 | 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:195:63 + --> $DIR/invalid-target.rs:198:63 | -195 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +198 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a trait - --> $DIR/invalid-target.rs:200:5 + --> $DIR/invalid-target.rs:203:5 | -200 | sampler, block, sampled_image, generic_image_type, // struct-only +203 | 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:200:14 + --> $DIR/invalid-target.rs:203:14 | -200 | sampler, block, sampled_image, generic_image_type, // struct-only +203 | 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:200:21 + --> $DIR/invalid-target.rs:203:21 | -200 | sampler, block, sampled_image, generic_image_type, // struct-only +203 | 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:200:36 + --> $DIR/invalid-target.rs:203:36 | -200 | sampler, block, sampled_image, generic_image_type, // struct-only +203 | 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:201:5 + --> $DIR/invalid-target.rs:204:5 | -201 | vertex, // fn-only +204 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a trait - --> $DIR/invalid-target.rs:202:5 + --> $DIR/invalid-target.rs:205:5 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +205 | 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:202:14 + --> $DIR/invalid-target.rs:205:14 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +205 | 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:202:24 + --> $DIR/invalid-target.rs:205:24 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +205 | 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:202:44 + --> $DIR/invalid-target.rs:205:44 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +205 | 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:202:57 + --> $DIR/invalid-target.rs:205:57 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +205 | 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:202:63 + --> $DIR/invalid-target.rs:205:63 | -202 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +205 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:234:5 + --> $DIR/invalid-target.rs:237:5 | -234 | sampler, block, sampled_image, generic_image_type, // struct-only +237 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:234:14 + --> $DIR/invalid-target.rs:237:14 | -234 | sampler, block, sampled_image, generic_image_type, // struct-only +237 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:234:21 + --> $DIR/invalid-target.rs:237:21 | -234 | sampler, block, sampled_image, generic_image_type, // struct-only +237 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a implementation block - --> $DIR/invalid-target.rs:234:36 + --> $DIR/invalid-target.rs:237:36 | -234 | sampler, block, sampled_image, generic_image_type, // struct-only +237 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a implementation block - --> $DIR/invalid-target.rs:235:5 + --> $DIR/invalid-target.rs:238:5 | -235 | vertex, // fn-only +238 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:236:5 + --> $DIR/invalid-target.rs:239:5 | -236 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +239 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:236:14 + --> $DIR/invalid-target.rs:239:14 | -236 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +239 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:236:24 + --> $DIR/invalid-target.rs:239:24 | -236 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +239 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:236:44 + --> $DIR/invalid-target.rs:239:44 | -236 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +239 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:236:57 + --> $DIR/invalid-target.rs:239:57 | -236 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +239 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a implementation block - --> $DIR/invalid-target.rs:236:63 + --> $DIR/invalid-target.rs:239:63 | -236 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +239 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a function - --> $DIR/invalid-target.rs:261:5 + --> $DIR/invalid-target.rs:264:5 | -261 | sampler, block, sampled_image, generic_image_type, // struct-only +264 | 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:261:14 + --> $DIR/invalid-target.rs:264:14 | -261 | sampler, block, sampled_image, generic_image_type, // struct-only +264 | 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:261:21 + --> $DIR/invalid-target.rs:264:21 | -261 | sampler, block, sampled_image, generic_image_type, // struct-only +264 | 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:261:36 + --> $DIR/invalid-target.rs:264:36 | -261 | sampler, block, sampled_image, generic_image_type, // struct-only +264 | 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:262:5 + --> $DIR/invalid-target.rs:265:5 | -262 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +265 | 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:262:14 + --> $DIR/invalid-target.rs:265:14 | -262 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +265 | 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:262:24 + --> $DIR/invalid-target.rs:265:24 | -262 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +265 | 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:262:44 + --> $DIR/invalid-target.rs:265:44 | -262 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +265 | 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:262:57 + --> $DIR/invalid-target.rs:265:57 | -262 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +265 | 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:262:63 + --> $DIR/invalid-target.rs:265:63 | -262 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +265 | 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:266:9 + --> $DIR/invalid-target.rs:269:9 | -266 | sampler, block, sampled_image, generic_image_type, // struct-only +269 | 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:266:18 + --> $DIR/invalid-target.rs:269:18 | -266 | sampler, block, sampled_image, generic_image_type, // struct-only +269 | 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:266:25 + --> $DIR/invalid-target.rs:269:25 | -266 | sampler, block, sampled_image, generic_image_type, // struct-only +269 | 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:266:40 + --> $DIR/invalid-target.rs:269:40 | -266 | sampler, block, sampled_image, generic_image_type, // struct-only +269 | 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:267:9 + --> $DIR/invalid-target.rs:270:9 | -267 | vertex, // fn-only +270 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a struct, not on a statement - --> $DIR/invalid-target.rs:272:9 + --> $DIR/invalid-target.rs:275:9 | -272 | sampler, block, sampled_image, generic_image_type, // struct-only +275 | 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:272:18 + --> $DIR/invalid-target.rs:275:18 | -272 | sampler, block, sampled_image, generic_image_type, // struct-only +275 | 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:272:25 + --> $DIR/invalid-target.rs:275:25 | -272 | sampler, block, sampled_image, generic_image_type, // struct-only +275 | 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:272:40 + --> $DIR/invalid-target.rs:275:40 | -272 | sampler, block, sampled_image, generic_image_type, // struct-only +275 | 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:273:9 + --> $DIR/invalid-target.rs:276:9 | -273 | vertex, // fn-only +276 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a statement - --> $DIR/invalid-target.rs:274:9 + --> $DIR/invalid-target.rs:277:9 | -274 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +277 | 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:274:18 + --> $DIR/invalid-target.rs:277:18 | -274 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +277 | 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:274:28 + --> $DIR/invalid-target.rs:277:28 | -274 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +277 | 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:274:48 + --> $DIR/invalid-target.rs:277:48 | -274 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +277 | 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:274:61 + --> $DIR/invalid-target.rs:277:61 | -274 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +277 | 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:274:67 + --> $DIR/invalid-target.rs:277:67 | -274 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +277 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a closure - --> $DIR/invalid-target.rs:279:13 + --> $DIR/invalid-target.rs:282:13 | -279 | sampler, block, sampled_image, generic_image_type, // struct-only +282 | 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:279:22 + --> $DIR/invalid-target.rs:282:22 | -279 | sampler, block, sampled_image, generic_image_type, // struct-only +282 | 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:279:29 + --> $DIR/invalid-target.rs:282:29 | -279 | sampler, block, sampled_image, generic_image_type, // struct-only +282 | 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:279:44 + --> $DIR/invalid-target.rs:282:44 | -279 | sampler, block, sampled_image, generic_image_type, // struct-only +282 | 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:280:13 + --> $DIR/invalid-target.rs:283:13 | -280 | vertex, // fn-only +283 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a closure - --> $DIR/invalid-target.rs:281:13 + --> $DIR/invalid-target.rs:284:13 | -281 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +284 | 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:281:22 + --> $DIR/invalid-target.rs:284:22 | -281 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +284 | 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:281:32 + --> $DIR/invalid-target.rs:284:32 | -281 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +284 | 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:281:52 + --> $DIR/invalid-target.rs:284:52 | -281 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +284 | 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:281:65 + --> $DIR/invalid-target.rs:284:65 | -281 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +284 | 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:281:71 + --> $DIR/invalid-target.rs:284:71 | -281 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +284 | 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:287:13 + --> $DIR/invalid-target.rs:290:13 | -287 | sampler, block, sampled_image, generic_image_type, // struct-only +290 | 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:287:22 + --> $DIR/invalid-target.rs:290:22 | -287 | sampler, block, sampled_image, generic_image_type, // struct-only +290 | 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:287:29 + --> $DIR/invalid-target.rs:290:29 | -287 | sampler, block, sampled_image, generic_image_type, // struct-only +290 | 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:287:44 + --> $DIR/invalid-target.rs:290:44 | -287 | sampler, block, sampled_image, generic_image_type, // struct-only +290 | 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:288:13 + --> $DIR/invalid-target.rs:291:13 | -288 | vertex, // fn-only +291 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a expression - --> $DIR/invalid-target.rs:289:13 + --> $DIR/invalid-target.rs:292:13 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +292 | 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:289:22 + --> $DIR/invalid-target.rs:292:22 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +292 | 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:289:32 + --> $DIR/invalid-target.rs:292:32 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +292 | 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:289:52 + --> $DIR/invalid-target.rs:292:52 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +292 | 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:289:65 + --> $DIR/invalid-target.rs:292:65 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +292 | 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:289:71 + --> $DIR/invalid-target.rs:292:71 | -289 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +292 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a match arm - --> $DIR/invalid-target.rs:297:13 + --> $DIR/invalid-target.rs:300:13 | -297 | sampler, block, sampled_image, generic_image_type, // struct-only +300 | 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:297:22 + --> $DIR/invalid-target.rs:300:22 | -297 | sampler, block, sampled_image, generic_image_type, // struct-only +300 | 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:297:29 + --> $DIR/invalid-target.rs:300:29 | -297 | sampler, block, sampled_image, generic_image_type, // struct-only +300 | 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:297:44 + --> $DIR/invalid-target.rs:300:44 | -297 | sampler, block, sampled_image, generic_image_type, // struct-only +300 | 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:298:13 + --> $DIR/invalid-target.rs:301:13 | -298 | vertex, // fn-only +301 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a match arm - --> $DIR/invalid-target.rs:299:13 + --> $DIR/invalid-target.rs:302:13 | -299 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +302 | 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:299:22 + --> $DIR/invalid-target.rs:302:22 | -299 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +302 | 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:299:32 + --> $DIR/invalid-target.rs:302:32 | -299 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +302 | 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:299:52 + --> $DIR/invalid-target.rs:302:52 | -299 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +302 | 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:299:65 + --> $DIR/invalid-target.rs:302:65 | -299 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +302 | 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:299:71 + --> $DIR/invalid-target.rs:302:71 | -299 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +302 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a lifetime parameter - --> $DIR/invalid-target.rs:307:9 + --> $DIR/invalid-target.rs:311:9 | -307 | sampler, block, sampled_image, generic_image_type, // struct-only +311 | 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:307:18 + --> $DIR/invalid-target.rs:311:18 | -307 | sampler, block, sampled_image, generic_image_type, // struct-only +311 | 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:307:25 + --> $DIR/invalid-target.rs:311:25 | -307 | sampler, block, sampled_image, generic_image_type, // struct-only +311 | 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:307:40 + --> $DIR/invalid-target.rs:311:40 | -307 | sampler, block, sampled_image, generic_image_type, // struct-only +311 | 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:308:9 + --> $DIR/invalid-target.rs:312:9 | -308 | vertex, // fn-only +312 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a lifetime parameter - --> $DIR/invalid-target.rs:309:9 + --> $DIR/invalid-target.rs:313:9 | -309 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +313 | 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:309:18 + --> $DIR/invalid-target.rs:313:18 | -309 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +313 | 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:309:28 + --> $DIR/invalid-target.rs:313:28 | -309 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +313 | 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:309:48 + --> $DIR/invalid-target.rs:313:48 | -309 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +313 | 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:309:61 + --> $DIR/invalid-target.rs:313:61 | -309 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +313 | 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:309:67 + --> $DIR/invalid-target.rs:313:67 | -309 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +313 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a type parameter - --> $DIR/invalid-target.rs:312:9 + --> $DIR/invalid-target.rs:316:9 | -312 | sampler, block, sampled_image, generic_image_type, // struct-only +316 | 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:312:18 + --> $DIR/invalid-target.rs:316:18 | -312 | sampler, block, sampled_image, generic_image_type, // struct-only +316 | 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:312:25 + --> $DIR/invalid-target.rs:316:25 | -312 | sampler, block, sampled_image, generic_image_type, // struct-only +316 | 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:312:40 + --> $DIR/invalid-target.rs:316:40 | -312 | sampler, block, sampled_image, generic_image_type, // struct-only +316 | 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:313:9 + --> $DIR/invalid-target.rs:317:9 | -313 | vertex, // fn-only +317 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a type parameter - --> $DIR/invalid-target.rs:314:9 + --> $DIR/invalid-target.rs:318:9 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +318 | 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:314:18 + --> $DIR/invalid-target.rs:318:18 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +318 | 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:314:28 + --> $DIR/invalid-target.rs:318:28 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +318 | 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:314:48 + --> $DIR/invalid-target.rs:318:48 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +318 | 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:314:61 + --> $DIR/invalid-target.rs:318:61 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +318 | 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:314:67 + --> $DIR/invalid-target.rs:318:67 | -314 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +318 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a const parameter - --> $DIR/invalid-target.rs:317:9 + --> $DIR/invalid-target.rs:321:9 | -317 | sampler, block, sampled_image, generic_image_type, // struct-only +321 | 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:317:18 + --> $DIR/invalid-target.rs:321:18 | -317 | sampler, block, sampled_image, generic_image_type, // struct-only +321 | 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:317:25 + --> $DIR/invalid-target.rs:321:25 | -317 | sampler, block, sampled_image, generic_image_type, // struct-only +321 | 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:317:40 + --> $DIR/invalid-target.rs:321:40 | -317 | sampler, block, sampled_image, generic_image_type, // struct-only +321 | 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:318:9 + --> $DIR/invalid-target.rs:322:9 | -318 | vertex, // fn-only +322 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a const parameter - --> $DIR/invalid-target.rs:319:9 + --> $DIR/invalid-target.rs:323:9 | -319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +323 | 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:319:18 + --> $DIR/invalid-target.rs:323:18 | -319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +323 | 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:319:28 + --> $DIR/invalid-target.rs:323:28 | -319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +323 | 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:319:48 + --> $DIR/invalid-target.rs:323:48 | -319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +323 | 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:319:61 + --> $DIR/invalid-target.rs:323:61 | -319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +323 | 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:319:67 + --> $DIR/invalid-target.rs:323:67 | -319 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +323 | 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:206:9 + --> $DIR/invalid-target.rs:209:9 | -206 | sampler, block, sampled_image, generic_image_type, // struct-only +209 | 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:206:18 + --> $DIR/invalid-target.rs:209:18 | -206 | sampler, block, sampled_image, generic_image_type, // struct-only +209 | 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:206:25 + --> $DIR/invalid-target.rs:209:25 | -206 | sampler, block, sampled_image, generic_image_type, // struct-only +209 | 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:206:40 + --> $DIR/invalid-target.rs:209:40 | -206 | sampler, block, sampled_image, generic_image_type, // struct-only +209 | 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:207:9 + --> $DIR/invalid-target.rs:210:9 | -207 | vertex, // fn-only +210 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:208:9 + --> $DIR/invalid-target.rs:211:9 | -208 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +211 | 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:208:18 + --> $DIR/invalid-target.rs:211:18 | -208 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +211 | 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:208:28 + --> $DIR/invalid-target.rs:211:28 | -208 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +211 | 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:208:48 + --> $DIR/invalid-target.rs:211:48 | -208 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +211 | 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:208:61 + --> $DIR/invalid-target.rs:211:61 | -208 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +211 | 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:208:67 + --> $DIR/invalid-target.rs:211:67 | -208 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +211 | 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:213:9 + --> $DIR/invalid-target.rs:216:9 | -213 | sampler, block, sampled_image, generic_image_type, // struct-only +216 | 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:213:18 + --> $DIR/invalid-target.rs:216:18 | -213 | sampler, block, sampled_image, generic_image_type, // struct-only +216 | 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:213:25 + --> $DIR/invalid-target.rs:216:25 | -213 | sampler, block, sampled_image, generic_image_type, // struct-only +216 | 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:213:40 + --> $DIR/invalid-target.rs:216:40 | -213 | sampler, block, sampled_image, generic_image_type, // struct-only +216 | 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:214:9 + --> $DIR/invalid-target.rs:217:9 | -214 | vertex, // fn-only +217 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:215:9 + --> $DIR/invalid-target.rs:218:9 | -215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +218 | 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:215:18 + --> $DIR/invalid-target.rs:218:18 | -215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +218 | 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:215:28 + --> $DIR/invalid-target.rs:218:28 | -215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +218 | 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:215:48 + --> $DIR/invalid-target.rs:218:48 | -215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +218 | 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:215:61 + --> $DIR/invalid-target.rs:218:61 | -215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +218 | 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:215:67 + --> $DIR/invalid-target.rs:218:67 | -215 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +218 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a required trait method - --> $DIR/invalid-target.rs:220:9 + --> $DIR/invalid-target.rs:223:9 | -220 | sampler, block, sampled_image, generic_image_type, // struct-only +223 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a required trait method - --> $DIR/invalid-target.rs:220:18 + --> $DIR/invalid-target.rs:223:18 | -220 | sampler, block, sampled_image, generic_image_type, // struct-only +223 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a required trait method - --> $DIR/invalid-target.rs:220:25 + --> $DIR/invalid-target.rs:223:25 | -220 | sampler, block, sampled_image, generic_image_type, // struct-only +223 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a required trait method - --> $DIR/invalid-target.rs:220:40 + --> $DIR/invalid-target.rs:223:40 | -220 | sampler, block, sampled_image, generic_image_type, // struct-only +223 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function, not on a required trait method - --> $DIR/invalid-target.rs:221:9 + --> $DIR/invalid-target.rs:224:9 | -221 | vertex, // fn-only +224 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a required trait method - --> $DIR/invalid-target.rs:222:9 + --> $DIR/invalid-target.rs:225:9 | -222 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +225 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a required trait method - --> $DIR/invalid-target.rs:222:18 + --> $DIR/invalid-target.rs:225:18 | -222 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +225 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a required trait method - --> $DIR/invalid-target.rs:222:28 + --> $DIR/invalid-target.rs:225:28 | -222 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +225 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a required trait method - --> $DIR/invalid-target.rs:222:48 + --> $DIR/invalid-target.rs:225:48 | -222 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +225 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a required trait method - --> $DIR/invalid-target.rs:222:61 + --> $DIR/invalid-target.rs:225:61 | -222 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +225 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a required trait method - --> $DIR/invalid-target.rs:222:67 + --> $DIR/invalid-target.rs:225:67 | -222 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +225 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:227:9 + --> $DIR/invalid-target.rs:230:9 | -227 | sampler, block, sampled_image, generic_image_type, // struct-only +230 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:227:18 + --> $DIR/invalid-target.rs:230:18 | -227 | sampler, block, sampled_image, generic_image_type, // struct-only +230 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:227:25 + --> $DIR/invalid-target.rs:230:25 | -227 | sampler, block, sampled_image, generic_image_type, // struct-only +230 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:227:40 + --> $DIR/invalid-target.rs:230:40 | -227 | sampler, block, sampled_image, generic_image_type, // struct-only +230 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:228:9 + --> $DIR/invalid-target.rs:231:9 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +231 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:228:18 + --> $DIR/invalid-target.rs:231:18 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +231 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:228:28 + --> $DIR/invalid-target.rs:231:28 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +231 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:228:48 + --> $DIR/invalid-target.rs:231:48 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +231 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:228:61 + --> $DIR/invalid-target.rs:231:61 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +231 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:228:67 + --> $DIR/invalid-target.rs:231:67 | -228 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +231 | 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:179:9 + --> $DIR/invalid-target.rs:182:9 | -179 | sampler, block, sampled_image, generic_image_type, // struct-only +182 | 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:179:18 + --> $DIR/invalid-target.rs:182:18 | -179 | sampler, block, sampled_image, generic_image_type, // struct-only +182 | 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:179:25 + --> $DIR/invalid-target.rs:182:25 | -179 | sampler, block, sampled_image, generic_image_type, // struct-only +182 | 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:179:40 + --> $DIR/invalid-target.rs:182:40 | -179 | sampler, block, sampled_image, generic_image_type, // struct-only +182 | 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:180:9 + --> $DIR/invalid-target.rs:183:9 | -180 | vertex, // fn-only +183 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:181:9 + --> $DIR/invalid-target.rs:184:9 | -181 | 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 associated const - --> $DIR/invalid-target.rs:181:18 + --> $DIR/invalid-target.rs:184:18 | -181 | 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 associated const - --> $DIR/invalid-target.rs:181:28 + --> $DIR/invalid-target.rs:184:28 | -181 | 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 associated const - --> $DIR/invalid-target.rs:181:48 + --> $DIR/invalid-target.rs:184:48 | -181 | 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 associated const - --> $DIR/invalid-target.rs:181:61 + --> $DIR/invalid-target.rs:184:61 | -181 | 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 associated const - --> $DIR/invalid-target.rs:181:67 + --> $DIR/invalid-target.rs:184:67 | -181 | 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 struct, not on a inherent method - --> $DIR/invalid-target.rs:186:9 + --> $DIR/invalid-target.rs:189:9 | -186 | sampler, block, sampled_image, generic_image_type, // struct-only +189 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a inherent method - --> $DIR/invalid-target.rs:186:18 + --> $DIR/invalid-target.rs:189:18 | -186 | sampler, block, sampled_image, generic_image_type, // struct-only +189 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a inherent method - --> $DIR/invalid-target.rs:186:25 + --> $DIR/invalid-target.rs:189:25 | -186 | sampler, block, sampled_image, generic_image_type, // struct-only +189 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a inherent method - --> $DIR/invalid-target.rs:186:40 + --> $DIR/invalid-target.rs:189:40 | -186 | sampler, block, sampled_image, generic_image_type, // struct-only +189 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a inherent method - --> $DIR/invalid-target.rs:187:9 + --> $DIR/invalid-target.rs:190:9 | -187 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +190 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a inherent method - --> $DIR/invalid-target.rs:187:18 + --> $DIR/invalid-target.rs:190:18 | -187 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +190 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a inherent method - --> $DIR/invalid-target.rs:187:28 + --> $DIR/invalid-target.rs:190:28 | -187 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +190 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a inherent method - --> $DIR/invalid-target.rs:187:48 + --> $DIR/invalid-target.rs:190:48 | -187 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +190 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a inherent method - --> $DIR/invalid-target.rs:187:61 + --> $DIR/invalid-target.rs:190:61 | -187 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +190 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a inherent method - --> $DIR/invalid-target.rs:187:67 + --> $DIR/invalid-target.rs:190:67 | -187 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +190 | 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:240:9 + --> $DIR/invalid-target.rs:243:9 | -240 | sampler, block, sampled_image, generic_image_type, // struct-only +243 | 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:240:18 + --> $DIR/invalid-target.rs:243:18 | -240 | sampler, block, sampled_image, generic_image_type, // struct-only +243 | 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:240:25 + --> $DIR/invalid-target.rs:243:25 | -240 | sampler, block, sampled_image, generic_image_type, // struct-only +243 | 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:240:40 + --> $DIR/invalid-target.rs:243:40 | -240 | sampler, block, sampled_image, generic_image_type, // struct-only +243 | 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:241:9 + --> $DIR/invalid-target.rs:244:9 | -241 | vertex, // fn-only +244 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated type - --> $DIR/invalid-target.rs:242:9 + --> $DIR/invalid-target.rs:245:9 | -242 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +245 | 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:242:18 + --> $DIR/invalid-target.rs:245:18 | -242 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +245 | 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:242:28 + --> $DIR/invalid-target.rs:245:28 | -242 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +245 | 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:242:48 + --> $DIR/invalid-target.rs:245:48 | -242 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +245 | 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:242:61 + --> $DIR/invalid-target.rs:245:61 | -242 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +245 | 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:242:67 + --> $DIR/invalid-target.rs:245:67 | -242 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +245 | 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:247:9 + --> $DIR/invalid-target.rs:250:9 | -247 | sampler, block, sampled_image, generic_image_type, // struct-only +250 | 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:247:18 + --> $DIR/invalid-target.rs:250:18 | -247 | sampler, block, sampled_image, generic_image_type, // struct-only +250 | 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:247:25 + --> $DIR/invalid-target.rs:250:25 | -247 | sampler, block, sampled_image, generic_image_type, // struct-only +250 | 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:247:40 + --> $DIR/invalid-target.rs:250:40 | -247 | sampler, block, sampled_image, generic_image_type, // struct-only +250 | 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:248:9 + --> $DIR/invalid-target.rs:251:9 | -248 | vertex, // fn-only +251 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a associated const - --> $DIR/invalid-target.rs:249:9 + --> $DIR/invalid-target.rs:252:9 | -249 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +252 | 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:249:18 + --> $DIR/invalid-target.rs:252:18 | -249 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +252 | 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:249:28 + --> $DIR/invalid-target.rs:252:28 | -249 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +252 | 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:249:48 + --> $DIR/invalid-target.rs:252:48 | -249 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +252 | 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:249:61 + --> $DIR/invalid-target.rs:252:61 | -249 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +252 | 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:249:67 + --> $DIR/invalid-target.rs:252:67 | -249 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +252 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:254:9 + --> $DIR/invalid-target.rs:257:9 | -254 | sampler, block, sampled_image, generic_image_type, // struct-only +257 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:254:18 + --> $DIR/invalid-target.rs:257:18 | -254 | sampler, block, sampled_image, generic_image_type, // struct-only +257 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:254:25 + --> $DIR/invalid-target.rs:257:25 | -254 | sampler, block, sampled_image, generic_image_type, // struct-only +257 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^ error: attribute is only valid on a struct, not on a provided trait method - --> $DIR/invalid-target.rs:254:40 + --> $DIR/invalid-target.rs:257:40 | -254 | sampler, block, sampled_image, generic_image_type, // struct-only +257 | sampler, block, sampled_image, generic_image_type, // struct-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:255:9 + --> $DIR/invalid-target.rs:258:9 | -255 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +258 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:255:18 + --> $DIR/invalid-target.rs:258:18 | -255 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +258 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:255:28 + --> $DIR/invalid-target.rs:258:28 | -255 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +258 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:255:48 + --> $DIR/invalid-target.rs:258:48 | -255 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +258 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:255:61 + --> $DIR/invalid-target.rs:258:61 | -255 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +258 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^ error: attribute is only valid on a function parameter, not on a provided trait method - --> $DIR/invalid-target.rs:255:67 + --> $DIR/invalid-target.rs:258:67 | -255 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +258 | 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:71:9 + --> $DIR/invalid-target.rs:74:9 | -71 | sampler, block, sampled_image, generic_image_type, // struct-only +74 | 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:71:18 + --> $DIR/invalid-target.rs:74:18 | -71 | sampler, block, sampled_image, generic_image_type, // struct-only +74 | 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:71:25 + --> $DIR/invalid-target.rs:74:25 | -71 | sampler, block, sampled_image, generic_image_type, // struct-only +74 | 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:71:40 + --> $DIR/invalid-target.rs:74:40 | -71 | sampler, block, sampled_image, generic_image_type, // struct-only +74 | 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:72:9 + --> $DIR/invalid-target.rs:75:9 | -72 | vertex, // fn-only +75 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a foreign type - --> $DIR/invalid-target.rs:73:9 + --> $DIR/invalid-target.rs:76:9 | -73 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +76 | 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:73:18 + --> $DIR/invalid-target.rs:76:18 | -73 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +76 | 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:73:28 + --> $DIR/invalid-target.rs:76:28 | -73 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +76 | 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:73:48 + --> $DIR/invalid-target.rs:76:48 | -73 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +76 | 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:73:61 + --> $DIR/invalid-target.rs:76:61 | -73 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +76 | 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:73:67 + --> $DIR/invalid-target.rs:76:67 | -73 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +76 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign static item - --> $DIR/invalid-target.rs:78:9 + --> $DIR/invalid-target.rs:81:9 | -78 | sampler, block, sampled_image, generic_image_type, // struct-only +81 | 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:78:18 + --> $DIR/invalid-target.rs:81:18 | -78 | sampler, block, sampled_image, generic_image_type, // struct-only +81 | 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:78:25 + --> $DIR/invalid-target.rs:81:25 | -78 | sampler, block, sampled_image, generic_image_type, // struct-only +81 | 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:78:40 + --> $DIR/invalid-target.rs:81:40 | -78 | sampler, block, sampled_image, generic_image_type, // struct-only +81 | 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:79:9 + --> $DIR/invalid-target.rs:82:9 | -79 | vertex, // fn-only +82 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a foreign static item - --> $DIR/invalid-target.rs:80:9 + --> $DIR/invalid-target.rs:83:9 | -80 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +83 | 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:80:18 + --> $DIR/invalid-target.rs:83:18 | -80 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +83 | 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:80:28 + --> $DIR/invalid-target.rs:83:28 | -80 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +83 | 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:80:48 + --> $DIR/invalid-target.rs:83:48 | -80 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +83 | 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:80:61 + --> $DIR/invalid-target.rs:83:61 | -80 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +83 | 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:80:67 + --> $DIR/invalid-target.rs:83:67 | -80 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +83 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: attribute is only valid on a struct, not on a foreign function - --> $DIR/invalid-target.rs:85:9 + --> $DIR/invalid-target.rs:88:9 | -85 | sampler, block, sampled_image, generic_image_type, // struct-only +88 | 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:85:18 + --> $DIR/invalid-target.rs:88:18 | -85 | sampler, block, sampled_image, generic_image_type, // struct-only +88 | 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:85:25 + --> $DIR/invalid-target.rs:88:25 | -85 | sampler, block, sampled_image, generic_image_type, // struct-only +88 | 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:85:40 + --> $DIR/invalid-target.rs:88:40 | -85 | sampler, block, sampled_image, generic_image_type, // struct-only +88 | 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:86:9 + --> $DIR/invalid-target.rs:89:9 | -86 | vertex, // fn-only +89 | vertex, // fn-only | ^^^^^^ error: attribute is only valid on a function parameter, not on a foreign function - --> $DIR/invalid-target.rs:87:9 + --> $DIR/invalid-target.rs:90:9 | -87 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +90 | 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:87:18 + --> $DIR/invalid-target.rs:90:18 | -87 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +90 | 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:87:28 + --> $DIR/invalid-target.rs:90:28 | -87 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +90 | 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:87:48 + --> $DIR/invalid-target.rs:90:48 | -87 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +90 | 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:87:61 + --> $DIR/invalid-target.rs:90:61 | -87 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +90 | 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:87:67 + --> $DIR/invalid-target.rs:90:67 | -87 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only +90 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only | ^^^^^^^^^ error: unconstrained opaque type - --> $DIR/invalid-target.rs:118:18 + --> $DIR/invalid-target.rs:121:18 | -118 | type _OpaqueTy = impl Copy; +121 | type _OpaqueTy = impl Copy; | ^^^^^^^^^ | = note: `_OpaqueTy` must be used in combination with a concrete type within the same crate error[E0308]: mismatched types - --> $DIR/invalid-target.rs:121:5 + --> $DIR/invalid-target.rs:124:5 | -118 | type _OpaqueTy = impl Copy; +121 | type _OpaqueTy = impl Copy; | --------- the expected opaque type -119 | -120 | fn _opaque_ty_definer() -> _OpaqueTy { +122 | +123 | fn _opaque_ty_definer() -> _OpaqueTy { | --------- expected `_OpaqueTy` because of return type -121 | () +124 | () | ^^ expected opaque type, found `()` | = note: expected opaque type `_OpaqueTy` found unit type `()` note: this item must have a `#[define_opaque(_OpaqueTy)]` attribute to be able to define hidden types - --> $DIR/invalid-target.rs:120:4 + --> $DIR/invalid-target.rs:123:4 | -120 | fn _opaque_ty_definer() -> _OpaqueTy { +123 | fn _opaque_ty_definer() -> _OpaqueTy { | ^^^^^^^^^^^^^^^^^^ error: aborting due to 439 previous errors