error: #[untagged] at an invalid position
 --> $DIR/field.rs:8:9
  |
8 |         #[untagged]
  |         ^^^^^^^^^^^

error: #[tag] at an invalid position
  --> $DIR/field.rs:13:15
   |
13 |     struct S2(#[tag = 1] String);
   |               ^^^^^^^^^^

error: #[optional] at an invalid position
  --> $DIR/field.rs:16:15
   |
16 |     struct S3(#[optional] String);
   |               ^^^^^^^^^^^

error: #[untagged] at an invalid position
  --> $DIR/field.rs:19:15
   |
19 |     struct S4(#[untagged] String);
   |               ^^^^^^^^^^^

error: #[flatten] at an invalid position
  --> $DIR/field.rs:22:15
   |
22 |     struct S8(#[flatten] String);
   |               ^^^^^^^^^^

error: #[tag] at an invalid position
  --> $DIR/field.rs:27:9
   |
27 |         #[tag = 0]
   |         ^^^^^^^^^^

error: #[untagged] at an invalid position
  --> $DIR/field.rs:34:9
   |
34 |         #[untagged]
   |         ^^^^^^^^^^^

error: #[optional] at an invalid position
  --> $DIR/field.rs:41:9
   |
41 |         #[optional]
   |         ^^^^^^^^^^^

error: #[flatten] at an invalid position
  --> $DIR/field.rs:48:9
   |
48 |         #[flatten]
   |         ^^^^^^^^^^

error: #[tag] at an invalid position
  --> $DIR/field.rs:54:9
   |
54 |         #[tag = 1]
   |         ^^^^^^^^^^

error: #[optional] at an invalid position
  --> $DIR/field.rs:61:9
   |
61 |         #[optional]
   |         ^^^^^^^^^^^

error: #[tag] at an invalid position
  --> $DIR/field.rs:67:21
   |
67 |     struct S12(u32, #[tag = 1] String);
   |                     ^^^^^^^^^^

error: #[optional] at an invalid position
  --> $DIR/field.rs:70:21
   |
70 |     struct S13(u32, #[optional] String);
   |                     ^^^^^^^^^^^

error: #[untagged] at an invalid position
  --> $DIR/field.rs:73:21
   |
73 |     struct S14(u32, #[untagged] String);
   |                     ^^^^^^^^^^^

error: #[flatten] at an invalid position
  --> $DIR/field.rs:76:21
   |
76 |     struct S15(u32, #[flatten] String);
   |                     ^^^^^^^^^^

error: #[untagged] at an invalid position
  --> $DIR/field.rs:84:9
   |
84 |         #[untagged]
   |         ^^^^^^^^^^^

error: #[tag] at an invalid position
  --> $DIR/field.rs:89:15
   |
89 |     struct S2(#[tag = 1] String);
   |               ^^^^^^^^^^

error: #[optional] at an invalid position
  --> $DIR/field.rs:92:15
   |
92 |     struct S3(#[optional] String);
   |               ^^^^^^^^^^^

error: #[untagged] at an invalid position
  --> $DIR/field.rs:95:15
   |
95 |     struct S4(#[untagged] String);
   |               ^^^^^^^^^^^

error: #[flatten] at an invalid position
  --> $DIR/field.rs:98:15
   |
98 |     struct S8(#[flatten] String);
   |               ^^^^^^^^^^

error: #[tag] at an invalid position
   --> $DIR/field.rs:103:9
    |
103 |         #[tag = 0]
    |         ^^^^^^^^^^

error: #[untagged] at an invalid position
   --> $DIR/field.rs:110:9
    |
110 |         #[untagged]
    |         ^^^^^^^^^^^

error: #[optional] at an invalid position
   --> $DIR/field.rs:117:9
    |
117 |         #[optional]
    |         ^^^^^^^^^^^

error: #[flatten] at an invalid position
   --> $DIR/field.rs:124:9
    |
124 |         #[flatten]
    |         ^^^^^^^^^^

error: #[tag] at an invalid position
   --> $DIR/field.rs:130:9
    |
130 |         #[tag = 1]
    |         ^^^^^^^^^^

error: #[optional] at an invalid position
   --> $DIR/field.rs:137:9
    |
137 |         #[optional]
    |         ^^^^^^^^^^^

error: #[tag] at an invalid position
   --> $DIR/field.rs:143:21
    |
143 |     struct S12(u32, #[tag = 1] String);
    |                     ^^^^^^^^^^

error: #[optional] at an invalid position
   --> $DIR/field.rs:146:21
    |
146 |     struct S13(u32, #[optional] String);
    |                     ^^^^^^^^^^^

error: #[untagged] at an invalid position
   --> $DIR/field.rs:149:21
    |
149 |     struct S14(u32, #[untagged] String);
    |                     ^^^^^^^^^^^

error: #[flatten] at an invalid position
   --> $DIR/field.rs:152:21
    |
152 |     struct S15(u32, #[flatten] String);
    |                     ^^^^^^^^^^
