error: unexpected `required`
  --> testdata/parser/field/modifiers/proto3.proto:6:5
   |
 6 |     required int32 a = 1;
   |     ^^^^^^^^ expected type name, `optional`, or `repeated`
   |
  help: delete it
   |
 6 | -     required int32 a = 1;
 6 | +     int32 a = 1;
   |
   |
   = help: required fields are only permitted in proto2; even then, their use is
           strongly discouraged

error: unexpected `required`
  --> testdata/parser/field/modifiers/proto3.proto:13:9
   |
12 | /     oneof bar {
13 | |         required int32 a = 1;
   | |         ^^^^^^^^ expected type name
14 | |         optional int32 a = 1;
...  |
18 | |     }
   | \_____- within this oneof definition
   |
  help: delete it
   |
13 | -         required int32 a = 1;
13 | +         int32 a = 1;
   |
   |
   = note: fields defined as part of a oneof definition may not have modifiers
           applied to them

error: unexpected `optional`
  --> testdata/parser/field/modifiers/proto3.proto:14:9
   |
12 | /     oneof bar {
13 | |         required int32 a = 1;
14 | |         optional int32 a = 1;
   | |         ^^^^^^^^ expected type name
15 | |         repeated int32 a = 1;
...  |
18 | |     }
   | \_____- within this oneof definition
   |
  help: delete it
   |
14 | -         optional int32 a = 1;
14 | +         int32 a = 1;
   |
   |
   = note: fields defined as part of a oneof definition may not have modifiers
           applied to them

error: unexpected `repeated`
  --> testdata/parser/field/modifiers/proto3.proto:15:9
   |
12 | /     oneof bar {
13 | |         required int32 a = 1;
14 | |         optional int32 a = 1;
15 | |         repeated int32 a = 1;
   | |         ^^^^^^^^ expected type name
16 | |         int32 a = 1;
17 | |         map<int32, int32> a = 1;
18 | |     }
   | \_____- within this oneof definition
   |
  help: delete it
   |
15 | -         repeated int32 a = 1;
15 | +         int32 a = 1;
   |
   |
   = note: fields defined as part of a oneof definition may not have modifiers
           applied to them
   = help: to emulate a repeated field in a oneof definition, define a local
           message type with a single repeated field

error: map fields are not allowed inside of a oneof definition
  --> testdata/parser/field/modifiers/proto3.proto:17:9
   |
17 |         map<int32, int32> a = 1;
   |         ^^^^^^^^^^^^^^^^^
   = help: to emulate a map field in a oneof definition, fine a local message
           type with a single map field

encountered 5 errors
