From b3b3fbec98daf26d05add7a45e9554d02fdf7f17 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Mon, 22 Mar 2021 05:01:39 +0200 Subject: [PATCH] tests: add a test for where `#[spirv(...)]` attributes can (not) be used. --- crates/rustc_codegen_spirv/src/symbols.rs | 2 + tests/ui/spirv-attr/invalid-target.rs | 394 ++++ tests/ui/spirv-attr/invalid-target.stderr | 2546 +++++++++++++++++++++ 3 files changed, 2942 insertions(+) create mode 100644 tests/ui/spirv-attr/invalid-target.rs create mode 100644 tests/ui/spirv-attr/invalid-target.stderr diff --git a/crates/rustc_codegen_spirv/src/symbols.rs b/crates/rustc_codegen_spirv/src/symbols.rs index fe41a19f1f..1ebc2860cd 100644 --- a/crates/rustc_codegen_spirv/src/symbols.rs +++ b/crates/rustc_codegen_spirv/src/symbols.rs @@ -450,6 +450,8 @@ impl From for Entry { } // FIXME(eddyb) maybe move this to `attr`? +// NOTE(eddyb) when adding new `#[spirv(...)]` attributes, the tests found inside +// `tests/ui/spirv-attr` should be updated (and new ones added if necessary). #[derive(Debug, Clone)] pub enum SpirvAttribute { Builtin(BuiltIn), diff --git a/tests/ui/spirv-attr/invalid-target.rs b/tests/ui/spirv-attr/invalid-target.rs new file mode 100644 index 0000000000..ff0a2ce837 --- /dev/null +++ b/tests/ui/spirv-attr/invalid-target.rs @@ -0,0 +1,394 @@ +// Tests that `#[spirv(...)]` attributes cannot be applied to the wrong "targets" +// (i.e. various kinds of definitions and other syntactic categories). + +// build-fail + +#![feature(extern_types, min_type_alias_impl_trait, stmt_expr_attributes, trait_alias)] + +// NOTE(eddyb) in the interest of keeping this test manageable, only one of +// each of the following categories of `#[spirv(...)]` attributes is used: +// * builtin: `position` +// * storage class: `uniform` +// * entry: `vertex` + +// NOTE(eddyb) accounting for the number of errors this test actually produces: +// * 422 "attribute is only valid on" errors (see `invalid-target.stderr`) +// * 40 `#[spirv(...)]` (excluding `macro_rules!`, which doesn't get the above error) +// * at most 11 attributes per `#[spirv(...)]`, so an upper bound of `40*11 = 440` +// * the difference between 440 and 422 is 18, i.e. valid attributes, made up of: +// * 5 on `_Struct` +// * 8 on functions, i.e. 2 on each of: +// * `_inherent_method` +// * `_trait_method_with_default`, +// * `_trait_method` (in `impl _Trait for ()`) +// * `_fn` +// * 4 on `_entry_param` +// * 1 on `_closure` + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +macro_rules! _macro { + () => {} +} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +extern crate spirv_std as _; + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +use spirv_std as _; + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +mod _mod {} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +extern "C" { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + type _ForeignTy; + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + static _FOREIGN_STATIC: (); + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + fn _foreign_fn(); +} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +static _STATIC: () = (); + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +const _CONST: () = (); + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +type _TyAlias = (); + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +type _OpaqueTy = impl Copy; + +fn _opaque_ty_definer() -> _OpaqueTy { () } + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +enum _Enum { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + _Variant { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + _field: () + } +} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +union _Union { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + _field: () +} + +#[spirv( + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +struct _Struct { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + _field: () +} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +impl _Struct { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + const _INHERENT_ASSOC_CONST: () = (); + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + position, descriptor_set = 0, binding = 0, flat, // param-only + )] + fn _inherent_method() {} +} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +trait _TraitAlias = Copy; + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +trait _Trait { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + type _AssocTy; + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + const _TRAIT_ASSOC_CONST: (); + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + fn _trait_method(); + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + position, descriptor_set = 0, binding = 0, flat, // param-only + )] + fn _trait_method_with_default() {} +} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only +)] +impl _Trait for () { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + type _AssocTy = (); + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + const _TRAIT_ASSOC_CONST: () = (); + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + position, descriptor_set = 0, binding = 0, flat, // param-only + )] + fn _trait_method() {} +} + +#[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + position, descriptor_set = 0, binding = 0, flat, // param-only +)] +fn _fn( + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + unroll_loops, // fn/closure-only + )] + _entry_param: () +) { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + let _statement = (); + + let _closure = + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + )] + || {}; + + ( + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + (1, 2, 3) // expression + ); + + match () { + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + _arm => {} + } +} + +fn _fn_with_generics< + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + '_lifetime_param, + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + _TyParam, + + #[spirv( + uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + vertex, // fn-only + position, descriptor_set = 0, binding = 0, flat, // param-only + unroll_loops, // fn/closure-only + )] + const _CONST_PARAM: usize +>() {} diff --git a/tests/ui/spirv-attr/invalid-target.stderr b/tests/ui/spirv-attr/invalid-target.stderr new file mode 100644 index 0000000000..0bffbcb779 --- /dev/null +++ b/tests/ui/spirv-attr/invalid-target.stderr @@ -0,0 +1,2546 @@ +error: attribute is only valid on a struct, not on a lifetime parameter + --> $DIR/invalid-target.rs:369:9 + | +369 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a lifetime parameter + --> $DIR/invalid-target.rs:369:18 + | +369 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a lifetime parameter + --> $DIR/invalid-target.rs:369:27 + | +369 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a lifetime parameter + --> $DIR/invalid-target.rs:369:34 + | +369 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a lifetime parameter + --> $DIR/invalid-target.rs:370:9 + | +370 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a lifetime parameter + --> $DIR/invalid-target.rs:371:9 + | +371 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a lifetime parameter + --> $DIR/invalid-target.rs:372:9 + | +372 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a lifetime parameter + --> $DIR/invalid-target.rs:372:19 + | +372 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a lifetime parameter + --> $DIR/invalid-target.rs:372:39 + | +372 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a lifetime parameter + --> $DIR/invalid-target.rs:372:52 + | +372 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a lifetime parameter + --> $DIR/invalid-target.rs:373:9 + | +373 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a type parameter + --> $DIR/invalid-target.rs:378:9 + | +378 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a type parameter + --> $DIR/invalid-target.rs:378:18 + | +378 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a type parameter + --> $DIR/invalid-target.rs:378:27 + | +378 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a type parameter + --> $DIR/invalid-target.rs:378:34 + | +378 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a type parameter + --> $DIR/invalid-target.rs:379:9 + | +379 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a type parameter + --> $DIR/invalid-target.rs:380:9 + | +380 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a type parameter + --> $DIR/invalid-target.rs:381:9 + | +381 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type parameter + --> $DIR/invalid-target.rs:381:19 + | +381 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type parameter + --> $DIR/invalid-target.rs:381:39 + | +381 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type parameter + --> $DIR/invalid-target.rs:381:52 + | +381 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a type parameter + --> $DIR/invalid-target.rs:382:9 + | +382 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a const parameter + --> $DIR/invalid-target.rs:387:9 + | +387 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a const parameter + --> $DIR/invalid-target.rs:387:18 + | +387 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a const parameter + --> $DIR/invalid-target.rs:387:27 + | +387 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a const parameter + --> $DIR/invalid-target.rs:387:34 + | +387 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a const parameter + --> $DIR/invalid-target.rs:388:9 + | +388 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a const parameter + --> $DIR/invalid-target.rs:389:9 + | +389 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a const parameter + --> $DIR/invalid-target.rs:390:9 + | +390 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a const parameter + --> $DIR/invalid-target.rs:390:19 + | +390 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a const parameter + --> $DIR/invalid-target.rs:390:39 + | +390 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a const parameter + --> $DIR/invalid-target.rs:390:52 + | +390 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a const parameter + --> $DIR/invalid-target.rs:391:9 + | +391 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a extern crate + --> $DIR/invalid-target.rs:40:5 + | +40 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a extern crate + --> $DIR/invalid-target.rs:40:14 + | +40 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a extern crate + --> $DIR/invalid-target.rs:40:23 + | +40 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a extern crate + --> $DIR/invalid-target.rs:40:30 + | +40 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a extern crate + --> $DIR/invalid-target.rs:41:5 + | +41 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a extern crate + --> $DIR/invalid-target.rs:42:5 + | +42 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a extern crate + --> $DIR/invalid-target.rs:43:5 + | +43 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a extern crate + --> $DIR/invalid-target.rs:43:15 + | +43 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a extern crate + --> $DIR/invalid-target.rs:43:35 + | +43 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a extern crate + --> $DIR/invalid-target.rs:43:48 + | +43 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a extern crate + --> $DIR/invalid-target.rs:44:5 + | +44 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a use + --> $DIR/invalid-target.rs:49:5 + | +49 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a use + --> $DIR/invalid-target.rs:49:14 + | +49 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a use + --> $DIR/invalid-target.rs:49:23 + | +49 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a use + --> $DIR/invalid-target.rs:49:30 + | +49 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a use + --> $DIR/invalid-target.rs:50:5 + | +50 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a use + --> $DIR/invalid-target.rs:51:5 + | +51 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a use + --> $DIR/invalid-target.rs:52:5 + | +52 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a use + --> $DIR/invalid-target.rs:52:15 + | +52 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a use + --> $DIR/invalid-target.rs:52:35 + | +52 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a use + --> $DIR/invalid-target.rs:52:48 + | +52 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a use + --> $DIR/invalid-target.rs:53:5 + | +53 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a module + --> $DIR/invalid-target.rs:58:5 + | +58 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a module + --> $DIR/invalid-target.rs:58:14 + | +58 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a module + --> $DIR/invalid-target.rs:58:23 + | +58 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a module + --> $DIR/invalid-target.rs:58:30 + | +58 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a module + --> $DIR/invalid-target.rs:59:5 + | +59 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a module + --> $DIR/invalid-target.rs:60:5 + | +60 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a module + --> $DIR/invalid-target.rs:61:5 + | +61 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a module + --> $DIR/invalid-target.rs:61:15 + | +61 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a module + --> $DIR/invalid-target.rs:61:35 + | +61 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a module + --> $DIR/invalid-target.rs:61:48 + | +61 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a module + --> $DIR/invalid-target.rs:62:5 + | +62 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign module + --> $DIR/invalid-target.rs:67:5 + | +67 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign module + --> $DIR/invalid-target.rs:67:14 + | +67 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign module + --> $DIR/invalid-target.rs:67:23 + | +67 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a foreign module + --> $DIR/invalid-target.rs:67:30 + | +67 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign module + --> $DIR/invalid-target.rs:68:5 + | +68 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a foreign module + --> $DIR/invalid-target.rs:69:5 + | +69 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign module + --> $DIR/invalid-target.rs:70:5 + | +70 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign module + --> $DIR/invalid-target.rs:70:15 + | +70 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign module + --> $DIR/invalid-target.rs:70:35 + | +70 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign module + --> $DIR/invalid-target.rs:70:48 + | +70 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a foreign module + --> $DIR/invalid-target.rs:71:5 + | +71 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a static item + --> $DIR/invalid-target.rs:103:5 + | +103 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a static item + --> $DIR/invalid-target.rs:103:14 + | +103 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a static item + --> $DIR/invalid-target.rs:103:23 + | +103 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a static item + --> $DIR/invalid-target.rs:103:30 + | +103 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a static item + --> $DIR/invalid-target.rs:104:5 + | +104 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a static item + --> $DIR/invalid-target.rs:105:5 + | +105 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a static item + --> $DIR/invalid-target.rs:106:5 + | +106 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a static item + --> $DIR/invalid-target.rs:106:15 + | +106 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a static item + --> $DIR/invalid-target.rs:106:35 + | +106 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a static item + --> $DIR/invalid-target.rs:106:48 + | +106 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a static item + --> $DIR/invalid-target.rs:107:5 + | +107 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a constant item + --> $DIR/invalid-target.rs:112:5 + | +112 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a constant item + --> $DIR/invalid-target.rs:112:14 + | +112 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a constant item + --> $DIR/invalid-target.rs:112:23 + | +112 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a constant item + --> $DIR/invalid-target.rs:112:30 + | +112 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a constant item + --> $DIR/invalid-target.rs:113:5 + | +113 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a constant item + --> $DIR/invalid-target.rs:114:5 + | +114 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a constant item + --> $DIR/invalid-target.rs:115:5 + | +115 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a constant item + --> $DIR/invalid-target.rs:115:15 + | +115 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a constant item + --> $DIR/invalid-target.rs:115:35 + | +115 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a constant item + --> $DIR/invalid-target.rs:115:48 + | +115 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a constant item + --> $DIR/invalid-target.rs:116:5 + | +116 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:121:5 + | +121 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:121:14 + | +121 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:121:23 + | +121 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:121:30 + | +121 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:122:5 + | +122 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a type alias + --> $DIR/invalid-target.rs:123:5 + | +123 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:124:5 + | +124 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:124:15 + | +124 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:124:35 + | +124 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:124:48 + | +124 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a type alias + --> $DIR/invalid-target.rs:125:5 + | +125 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:130:5 + | +130 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:130:14 + | +130 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:130:23 + | +130 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:130:30 + | +130 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a type alias + --> $DIR/invalid-target.rs:131:5 + | +131 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a type alias + --> $DIR/invalid-target.rs:132:5 + | +132 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:133:5 + | +133 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:133:15 + | +133 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:133:35 + | +133 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a type alias + --> $DIR/invalid-target.rs:133:48 + | +133 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a type alias + --> $DIR/invalid-target.rs:134:5 + | +134 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:141:5 + | +141 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:141:14 + | +141 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:141:23 + | +141 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:141:30 + | +141 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a enum + --> $DIR/invalid-target.rs:142:5 + | +142 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a enum + --> $DIR/invalid-target.rs:143:5 + | +143 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum + --> $DIR/invalid-target.rs:144:5 + | +144 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum + --> $DIR/invalid-target.rs:144:15 + | +144 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum + --> $DIR/invalid-target.rs:144:35 + | +144 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum + --> $DIR/invalid-target.rs:144:48 + | +144 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a enum + --> $DIR/invalid-target.rs:145:5 + | +145 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a enum variant + --> $DIR/invalid-target.rs:149:9 + | +149 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a enum variant + --> $DIR/invalid-target.rs:149:18 + | +149 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a enum variant + --> $DIR/invalid-target.rs:149:27 + | +149 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a enum variant + --> $DIR/invalid-target.rs:149:34 + | +149 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a enum variant + --> $DIR/invalid-target.rs:150:9 + | +150 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a enum variant + --> $DIR/invalid-target.rs:151:9 + | +151 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum variant + --> $DIR/invalid-target.rs:152:9 + | +152 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum variant + --> $DIR/invalid-target.rs:152:19 + | +152 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum variant + --> $DIR/invalid-target.rs:152:39 + | +152 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a enum variant + --> $DIR/invalid-target.rs:152:52 + | +152 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a enum variant + --> $DIR/invalid-target.rs:153:9 + | +153 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:157:13 + | +157 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:157:22 + | +157 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:157:31 + | +157 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:157:38 + | +157 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:158:13 + | +158 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a struct field + --> $DIR/invalid-target.rs:159:13 + | +159 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:160:13 + | +160 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:160:23 + | +160 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:160:43 + | +160 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:160:56 + | +160 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a struct field + --> $DIR/invalid-target.rs:161:13 + | +161 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a union + --> $DIR/invalid-target.rs:168:5 + | +168 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a union + --> $DIR/invalid-target.rs:168:14 + | +168 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a union + --> $DIR/invalid-target.rs:168:23 + | +168 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a union + --> $DIR/invalid-target.rs:168:30 + | +168 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a union + --> $DIR/invalid-target.rs:169:5 + | +169 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a union + --> $DIR/invalid-target.rs:170:5 + | +170 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a union + --> $DIR/invalid-target.rs:171:5 + | +171 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a union + --> $DIR/invalid-target.rs:171:15 + | +171 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a union + --> $DIR/invalid-target.rs:171:35 + | +171 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a union + --> $DIR/invalid-target.rs:171:48 + | +171 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a union + --> $DIR/invalid-target.rs:172:5 + | +172 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:176:9 + | +176 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:176:18 + | +176 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:176:27 + | +176 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:176:34 + | +176 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:177:9 + | +177 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a struct field + --> $DIR/invalid-target.rs:178:9 + | +178 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:179:9 + | +179 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:179:19 + | +179 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:179:39 + | +179 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:179:52 + | +179 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a struct field + --> $DIR/invalid-target.rs:180:9 + | +180 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a struct + --> $DIR/invalid-target.rs:186:5 + | +186 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct + --> $DIR/invalid-target.rs:187:5 + | +187 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct + --> $DIR/invalid-target.rs:187:15 + | +187 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct + --> $DIR/invalid-target.rs:187:35 + | +187 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct + --> $DIR/invalid-target.rs:187:48 + | +187 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a struct + --> $DIR/invalid-target.rs:188:5 + | +188 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:192:9 + | +192 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:192:18 + | +192 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:192:27 + | +192 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:192:34 + | +192 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a struct field + --> $DIR/invalid-target.rs:193:9 + | +193 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a struct field + --> $DIR/invalid-target.rs:194:9 + | +194 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:195:9 + | +195 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:195:19 + | +195 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:195:39 + | +195 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a struct field + --> $DIR/invalid-target.rs:195:52 + | +195 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a struct field + --> $DIR/invalid-target.rs:196:9 + | +196 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:202:5 + | +202 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:202:14 + | +202 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:202:23 + | +202 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:202:30 + | +202 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:203:5 + | +203 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a item + --> $DIR/invalid-target.rs:204:5 + | +204 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:205:5 + | +205 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:205:15 + | +205 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:205:35 + | +205 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:205:48 + | +205 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a item + --> $DIR/invalid-target.rs:206:5 + | +206 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a trait alias + --> $DIR/invalid-target.rs:227:5 + | +227 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a trait alias + --> $DIR/invalid-target.rs:227:14 + | +227 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a trait alias + --> $DIR/invalid-target.rs:227:23 + | +227 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a trait alias + --> $DIR/invalid-target.rs:227:30 + | +227 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a trait alias + --> $DIR/invalid-target.rs:228:5 + | +228 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a trait alias + --> $DIR/invalid-target.rs:229:5 + | +229 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait alias + --> $DIR/invalid-target.rs:230:5 + | +230 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait alias + --> $DIR/invalid-target.rs:230:15 + | +230 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait alias + --> $DIR/invalid-target.rs:230:35 + | +230 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait alias + --> $DIR/invalid-target.rs:230:48 + | +230 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a trait alias + --> $DIR/invalid-target.rs:231:5 + | +231 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a trait + --> $DIR/invalid-target.rs:236:5 + | +236 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a trait + --> $DIR/invalid-target.rs:236:14 + | +236 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a trait + --> $DIR/invalid-target.rs:236:23 + | +236 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a trait + --> $DIR/invalid-target.rs:236:30 + | +236 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a trait + --> $DIR/invalid-target.rs:237:5 + | +237 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a trait + --> $DIR/invalid-target.rs:238:5 + | +238 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait + --> $DIR/invalid-target.rs:239:5 + | +239 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait + --> $DIR/invalid-target.rs:239:15 + | +239 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait + --> $DIR/invalid-target.rs:239:35 + | +239 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a trait + --> $DIR/invalid-target.rs:239:48 + | +239 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a trait + --> $DIR/invalid-target.rs:240:5 + | +240 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:279:5 + | +279 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:279:14 + | +279 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:279:23 + | +279 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:279:30 + | +279 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a item + --> $DIR/invalid-target.rs:280:5 + | +280 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a item + --> $DIR/invalid-target.rs:281:5 + | +281 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:282:5 + | +282 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:282:15 + | +282 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:282:35 + | +282 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a item + --> $DIR/invalid-target.rs:282:48 + | +282 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a item + --> $DIR/invalid-target.rs:283:5 + | +283 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a function + --> $DIR/invalid-target.rs:313:5 + | +313 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a function + --> $DIR/invalid-target.rs:313:14 + | +313 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a function + --> $DIR/invalid-target.rs:313:23 + | +313 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a function + --> $DIR/invalid-target.rs:313:30 + | +313 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a function + --> $DIR/invalid-target.rs:314:5 + | +314 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a function + --> $DIR/invalid-target.rs:315:5 + | +315 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a function + --> $DIR/invalid-target.rs:315:15 + | +315 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a function + --> $DIR/invalid-target.rs:315:35 + | +315 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a function + --> $DIR/invalid-target.rs:315:48 + | +315 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a struct, not on a function param + --> $DIR/invalid-target.rs:319:9 + | +319 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a function param + --> $DIR/invalid-target.rs:319:18 + | +319 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a function param + --> $DIR/invalid-target.rs:319:27 + | +319 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a function param + --> $DIR/invalid-target.rs:319:34 + | +319 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a function param + --> $DIR/invalid-target.rs:320:9 + | +320 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a function param + --> $DIR/invalid-target.rs:321:9 + | +321 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function or closure, not on a function param + --> $DIR/invalid-target.rs:322:9 + | +322 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a statement + --> $DIR/invalid-target.rs:327:9 + | +327 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a statement + --> $DIR/invalid-target.rs:327:18 + | +327 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a statement + --> $DIR/invalid-target.rs:327:27 + | +327 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a statement + --> $DIR/invalid-target.rs:327:34 + | +327 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a statement + --> $DIR/invalid-target.rs:328:9 + | +328 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a statement + --> $DIR/invalid-target.rs:329:9 + | +329 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a statement + --> $DIR/invalid-target.rs:330:9 + | +330 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a statement + --> $DIR/invalid-target.rs:330:19 + | +330 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a statement + --> $DIR/invalid-target.rs:330:39 + | +330 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a statement + --> $DIR/invalid-target.rs:330:52 + | +330 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a statement + --> $DIR/invalid-target.rs:331:9 + | +331 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a closure + --> $DIR/invalid-target.rs:337:13 + | +337 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a closure + --> $DIR/invalid-target.rs:337:22 + | +337 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a closure + --> $DIR/invalid-target.rs:337:31 + | +337 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a closure + --> $DIR/invalid-target.rs:337:38 + | +337 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a closure + --> $DIR/invalid-target.rs:338:13 + | +338 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a closure + --> $DIR/invalid-target.rs:339:13 + | +339 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a closure + --> $DIR/invalid-target.rs:340:13 + | +340 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a closure + --> $DIR/invalid-target.rs:340:23 + | +340 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a closure + --> $DIR/invalid-target.rs:340:43 + | +340 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a closure + --> $DIR/invalid-target.rs:340:56 + | +340 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a struct, not on a expression + --> $DIR/invalid-target.rs:346:13 + | +346 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a expression + --> $DIR/invalid-target.rs:346:22 + | +346 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a expression + --> $DIR/invalid-target.rs:346:31 + | +346 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a expression + --> $DIR/invalid-target.rs:346:38 + | +346 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a expression + --> $DIR/invalid-target.rs:347:13 + | +347 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a expression + --> $DIR/invalid-target.rs:348:13 + | +348 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a expression + --> $DIR/invalid-target.rs:349:13 + | +349 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a expression + --> $DIR/invalid-target.rs:349:23 + | +349 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a expression + --> $DIR/invalid-target.rs:349:43 + | +349 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a expression + --> $DIR/invalid-target.rs:349:56 + | +349 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a expression + --> $DIR/invalid-target.rs:350:13 + | +350 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a match arm + --> $DIR/invalid-target.rs:357:13 + | +357 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a match arm + --> $DIR/invalid-target.rs:357:22 + | +357 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a match arm + --> $DIR/invalid-target.rs:357:31 + | +357 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a match arm + --> $DIR/invalid-target.rs:357:38 + | +357 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a match arm + --> $DIR/invalid-target.rs:358:13 + | +358 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a match arm + --> $DIR/invalid-target.rs:359:13 + | +359 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a match arm + --> $DIR/invalid-target.rs:360:13 + | +360 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a match arm + --> $DIR/invalid-target.rs:360:23 + | +360 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a match arm + --> $DIR/invalid-target.rs:360:43 + | +360 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a match arm + --> $DIR/invalid-target.rs:360:56 + | +360 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a match arm + --> $DIR/invalid-target.rs:361:13 + | +361 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:244:9 + | +244 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:244:18 + | +244 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:244:27 + | +244 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:244:34 + | +244 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:245:9 + | +245 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a associated type + --> $DIR/invalid-target.rs:246:9 + | +246 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:247:9 + | +247 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:247:19 + | +247 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:247:39 + | +247 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:247:52 + | +247 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a associated type + --> $DIR/invalid-target.rs:248:9 + | +248 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:253:9 + | +253 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:253:18 + | +253 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:253:27 + | +253 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:253:34 + | +253 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:254:9 + | +254 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a associated const + --> $DIR/invalid-target.rs:255:9 + | +255 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:256:9 + | +256 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:256:19 + | +256 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:256:39 + | +256 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:256:52 + | +256 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a associated const + --> $DIR/invalid-target.rs:257:9 + | +257 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:262:9 + | +262 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:262:18 + | +262 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:262:27 + | +262 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:262:34 + | +262 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:263:9 + | +263 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a method + --> $DIR/invalid-target.rs:264:9 + | +264 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:265:9 + | +265 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:265:19 + | +265 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:265:39 + | +265 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:265:52 + | +265 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a method + --> $DIR/invalid-target.rs:266:9 + | +266 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:271:9 + | +271 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:271:18 + | +271 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:271:27 + | +271 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:271:34 + | +271 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:272:9 + | +272 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:273:9 + | +273 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:273:19 + | +273 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:273:39 + | +273 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:273:52 + | +273 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:210:9 + | +210 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:210:18 + | +210 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:210:27 + | +210 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:210:34 + | +210 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:211:9 + | +211 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a associated const + --> $DIR/invalid-target.rs:212:9 + | +212 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:213:9 + | +213 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:213:19 + | +213 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:213:39 + | +213 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:213:52 + | +213 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a associated const + --> $DIR/invalid-target.rs:214:9 + | +214 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:219:9 + | +219 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:219:18 + | +219 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:219:27 + | +219 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:219:34 + | +219 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:220:9 + | +220 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:221:9 + | +221 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:221:19 + | +221 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:221:39 + | +221 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:221:52 + | +221 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:287:9 + | +287 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:287:18 + | +287 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:287:27 + | +287 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:287:34 + | +287 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated type + --> $DIR/invalid-target.rs:288:9 + | +288 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a associated type + --> $DIR/invalid-target.rs:289:9 + | +289 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:290:9 + | +290 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:290:19 + | +290 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:290:39 + | +290 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated type + --> $DIR/invalid-target.rs:290:52 + | +290 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a associated type + --> $DIR/invalid-target.rs:291:9 + | +291 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:296:9 + | +296 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:296:18 + | +296 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:296:27 + | +296 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:296:34 + | +296 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a associated const + --> $DIR/invalid-target.rs:297:9 + | +297 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a associated const + --> $DIR/invalid-target.rs:298:9 + | +298 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:299:9 + | +299 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:299:19 + | +299 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:299:39 + | +299 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a associated const + --> $DIR/invalid-target.rs:299:52 + | +299 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a associated const + --> $DIR/invalid-target.rs:300:9 + | +300 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:305:9 + | +305 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:305:18 + | +305 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:305:27 + | +305 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:305:34 + | +305 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a method + --> $DIR/invalid-target.rs:306:9 + | +306 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:307:9 + | +307 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:307:19 + | +307 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:307:39 + | +307 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a method + --> $DIR/invalid-target.rs:307:52 + | +307 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a struct, not on a foreign type + --> $DIR/invalid-target.rs:75:9 + | +75 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign type + --> $DIR/invalid-target.rs:75:18 + | +75 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign type + --> $DIR/invalid-target.rs:75:27 + | +75 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a foreign type + --> $DIR/invalid-target.rs:75:34 + | +75 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign type + --> $DIR/invalid-target.rs:76:9 + | +76 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a foreign type + --> $DIR/invalid-target.rs:77:9 + | +77 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign type + --> $DIR/invalid-target.rs:78:9 + | +78 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign type + --> $DIR/invalid-target.rs:78:19 + | +78 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign type + --> $DIR/invalid-target.rs:78:39 + | +78 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign type + --> $DIR/invalid-target.rs:78:52 + | +78 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a foreign type + --> $DIR/invalid-target.rs:79:9 + | +79 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign static item + --> $DIR/invalid-target.rs:84:9 + | +84 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign static item + --> $DIR/invalid-target.rs:84:18 + | +84 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign static item + --> $DIR/invalid-target.rs:84:27 + | +84 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a foreign static item + --> $DIR/invalid-target.rs:84:34 + | +84 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign static item + --> $DIR/invalid-target.rs:85:9 + | +85 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a foreign static item + --> $DIR/invalid-target.rs:86:9 + | +86 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign static item + --> $DIR/invalid-target.rs:87:9 + | +87 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign static item + --> $DIR/invalid-target.rs:87:19 + | +87 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign static item + --> $DIR/invalid-target.rs:87:39 + | +87 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign static item + --> $DIR/invalid-target.rs:87:52 + | +87 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a foreign static item + --> $DIR/invalid-target.rs:88:9 + | +88 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign function + --> $DIR/invalid-target.rs:93:9 + | +93 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign function + --> $DIR/invalid-target.rs:93:18 + | +93 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign function + --> $DIR/invalid-target.rs:93:27 + | +93 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^ + +error: attribute is only valid on a struct, not on a foreign function + --> $DIR/invalid-target.rs:93:34 + | +93 | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) + | ^^^^^^^^^^^^^ + +error: attribute is only valid on a struct, not on a foreign function + --> $DIR/invalid-target.rs:94:9 + | +94 | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function, not on a foreign function + --> $DIR/invalid-target.rs:95:9 + | +95 | vertex, // fn-only + | ^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign function + --> $DIR/invalid-target.rs:96:9 + | +96 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign function + --> $DIR/invalid-target.rs:96:19 + | +96 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign function + --> $DIR/invalid-target.rs:96:39 + | +96 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^^^^^^^^ + +error: attribute is only valid on a function parameter, not on a foreign function + --> $DIR/invalid-target.rs:96:52 + | +96 | position, descriptor_set = 0, binding = 0, flat, // param-only + | ^^^^ + +error: attribute is only valid on a function or closure, not on a foreign function + --> $DIR/invalid-target.rs:97:9 + | +97 | unroll_loops, // fn/closure-only + | ^^^^^^^^^^^^ + +error: #[spirv(..)] cannot be applied to a macro + --> $DIR/invalid-target.rs:28:1 + | +28 | / #[spirv( +29 | | uniform, sampler, block, sampled_image, // struct-only (incl. `image_type`) +30 | | image_type(dim = "Dim2D", depth = 0, arrayed = 0, multisampled = 0, sampled = 1, image_format = "Unknown"), +31 | | vertex, // fn-only +32 | | position, descriptor_set = 0, binding = 0, flat, // param-only +33 | | unroll_loops, // fn/closure-only +34 | | )] + | |__^ + +error: aborting due to 423 previous errors +