error: `features` cannot be set in "proto2"
  --> testdata/editions/proto2.proto:9:8
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
 9 | option features = {};
   |        ^^^^^^^^

error: `features` cannot be set in "proto2"
  --> testdata/editions/proto2.proto:12:12
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
12 |     option features = {};
   |            ^^^^^^^^

error: `features` cannot be set in "proto2"
  --> testdata/editions/proto2.proto:13:27
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
12 |     option features = {};
13 |     optional int32 x = 1 [features.field_presence = IMPLICIT];
   |                           ^^^^^^^^

error: `field_presence` is not supported in "proto2"
  --> testdata/editions/proto2.proto:13:27
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
12 |     option features = {};
13 |     optional int32 x = 1 [features.field_presence = IMPLICIT];
   |                           ^^^^^^^^^^^^^^^^^^^^^^^
   = help: `field_presence` requires at least Edition 2023

error: `features` cannot be set in "proto2"
  --> testdata/editions/proto2.proto:15:16
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
15 |         option features = {};
   |                ^^^^^^^^

error: `features` cannot be set in "proto2"
  --> testdata/editions/proto2.proto:16:22
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
15 |         option features = {};
16 |         int32 z = 2 [(google.protobuf.FieldOptions.features) = {}];
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: redundant custom option setting syntax
   --> testdata/editions/proto2.proto:16:22
    |
 16 |         int32 z = 2 [(google.protobuf.FieldOptions.features) = {}];
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                       |
    |                       this field is not a message extension
    |
   ::: <built-in>/google/protobuf/descriptor.proto:807:23
    |
807 |   optional FeatureSet features = 21;
    |                       --------
    |                        |
    |                        field declared inside of `google.protobuf.FieldOptions` here
    |
   ::: testdata/editions/proto2.proto:16:22
   help: replace `(...)` with a field name
    |
 16 | -         int32 z = 2 [(google.protobuf.FieldOptions.features) = {}];
 16 | +         int32 z = 2 [features = {}];
    |
    |
    = help: custom option setting syntax should only be used with message
            extensions

error: `features` cannot be set in "proto2"
  --> testdata/editions/proto2.proto:21:12
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
21 |     option features = {};
   |            ^^^^^^^^

error: `features` cannot be set in "proto2"
  --> testdata/editions/proto2.proto:22:12
   |
 3 | syntax = "proto2";
   |          -------- syntax specified here
...
21 |     option features = {};
22 |     X = 1 [features = {}];
   |            ^^^^^^^^

encountered 8 errors and 1 warning
