error: nested array expressions are not allowed
  --> testdata/options/values/enum.proto:37:41
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |        ---------------------------------^^---------
   |         |                               |
   |         ...within this array expression cannot nest this array expression...

error: unexpected range expression in option setting value
  --> testdata/options/values/enum.proto:37:45
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                                             ^^^^^^

error: cannot find `BAR_E3` in this scope
  --> testdata/options/values/enum.proto:25:8
   |
25 |     e: BAR_E3
   |        ^^^^^^ not found in this scope
   |
   = help: the full name of this scope is `buf.test`

error: mismatched types
  --> testdata/options/values/enum.proto:26:8
   |
26 |     e: BAZ_ZERO
   |        ^^^^^^^^ expected `buf.test.Bar`, found `buf.test.Baz`
27 |     e: buf.test.BAR_E1
...
41 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: enum type `buf.test.Baz`

error: qualified enum value reference
  --> testdata/options/values/enum.proto:27:8
   |
27 |     e: buf.test.BAR_E1
   |        ^^^^^^^^^^^^^^^
  help: replace it with the value's name
   |
27 | -     e: buf.test.BAR_E1
27 | +     e: BAR_E1
   |
   = note: Protobuf requires single identifiers when referencing to the names of
           enum values

error: cannot find `Bar.BAR_E1` in this scope
  --> testdata/options/values/enum.proto:28:8
   |
28 |     e: Bar.BAR_E1
   |        ^^^^^^^^^^ not found in this scope
   |
   = help: the full name of this scope is `buf.test`

error: mismatched types
  --> testdata/options/values/enum.proto:29:9
   |
29 |     e: -BAR_E1
   |        -^^^^^^ expected number, found `buf.test.Bar`
   |        |
   |        expected due to this
   |
  help: replace it with a literal value
   |
29 | -     e: -BAR_E1
29 | +     e: -1
   |
   |
   = note: expected: number
              found: enum type `buf.test.Bar`

error: mismatched types
  --> testdata/options/values/enum.proto:31:8
   |
31 |     i: Foo,
   |        ^^^ expected `int32`, found type reference `buf.test.Foo`
32 |     i: Foo.i,
...
41 |     repeated Bar e = 1;
42 |     repeated int32 i = 2;
   |     -------------- expected due to this
   |
   = note: expected: scalar type `int32`
              found: type reference `buf.test.Foo`

error: mismatched types
  --> testdata/options/values/enum.proto:32:8
   |
32 |     i: Foo.i,
   |        ^^^^^ expected `int32`, found `buf.test.Foo.i`
33 |     i: Foo.e,
...
41 |     repeated Bar e = 1;
42 |     repeated int32 i = 2;
   |     -------------- expected due to this
   |
   = note: expected: scalar type `int32`
              found: message field `buf.test.Foo.i`

error: mismatched types
  --> testdata/options/values/enum.proto:33:8
   |
33 |     i: Foo.e,
   |        ^^^^^ expected `int32`, found `buf.test.Foo.e`
34 |     i: BAR_ZERO
...
41 |     repeated Bar e = 1;
42 |     repeated int32 i = 2;
   |     -------------- expected due to this
   |
   = note: expected: scalar type `int32`
              found: message field `buf.test.Foo.e`

error: mismatched types
  --> testdata/options/values/enum.proto:34:8
   |
34 |     i: BAR_ZERO
   |        ^^^^^^^^ expected `int32`, found `buf.test.Bar`
35 |     i: buf.test.BAR_ZERO
...
41 |     repeated Bar e = 1;
42 |     repeated int32 i = 2;
   |     -------------- expected due to this
   |
   = note: expected: scalar type `int32`
              found: enum type `buf.test.Bar`

error: mismatched types
  --> testdata/options/values/enum.proto:35:8
   |
35 |     i: buf.test.BAR_ZERO
   |        ^^^^^^^^^^^^^^^^^ expected `int32`, found `buf.test.Bar`
...
41 |     repeated Bar e = 1;
42 |     repeated int32 i = 2;
   |     -------------- expected due to this
   |
   = note: expected: scalar type `int32`
              found: enum type `buf.test.Bar`

error: mismatched types
  --> testdata/options/values/enum.proto:37:9
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |         ^^^ expected `buf.test.Bar`, found floating-point literal
...
41 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: floating-point literal

error: mismatched types
  --> testdata/options/values/enum.proto:37:14
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |              ^^^^ expected `buf.test.Bar`, found `bool`
...
41 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: scalar type `bool`

error: mismatched types
  --> testdata/options/values/enum.proto:37:20
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                    ^^^^^ expected `buf.test.Bar`, found `string`
...
41 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: scalar type `string`

error: mismatched types
  --> testdata/options/values/enum.proto:37:27
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                           ^^^
   |                           |
   |                           expected `buf.test.Bar`, found floating-point literal
...
41 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: floating-point literal

error: mismatched types
  --> testdata/options/values/enum.proto:37:32
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                                ^^^
   |                                |
   |                                expected `buf.test.Bar`, found floating-point literal
...
41 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: floating-point literal

error: mismatched types
  --> testdata/options/values/enum.proto:37:37
   |
37 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                                     ^^
   |                                     |
   |                                     expected `buf.test.Bar`, found message expression
...
41 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: message expression

encountered 18 errors
