error: nested array expressions are not allowed
  --> testdata/options/values/enum.proto:23:41
   |
23 |     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:23:45
   |
23 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                                             ^^^^^^

error: cannot find `BAR_E3` in this scope
  --> testdata/options/values/enum.proto:11:8
   |
11 |     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:12:8
   |
12 |     e: BAZ_ZERO
   |        ^^^^^^^^ expected `buf.test.Bar`, found `buf.test.Baz`
13 |     e: buf.test.BAR_E1
...
27 |     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:13:8
   |
13 |     e: buf.test.BAR_E1
   |        ^^^^^^^^^^^^^^^
  help: replace it with the value's name
   |
13 | -     e: buf.test.BAR_E1
13 | +     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:14:8
   |
14 |     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:15:9
   |
15 |     e: -BAR_E1
   |        -^^^^^^ expected number, found `buf.test.Bar`
   |        |
   |        expected due to this
   |
  help: replace it with a literal value
   |
15 | -     e: -BAR_E1
15 | +     e: -1
   |
   |
   = note: expected: number
              found: enum type `buf.test.Bar`

error: mismatched types
  --> testdata/options/values/enum.proto:17:8
   |
17 |     i: Foo,
   |        ^^^ expected `int32`, found type reference `buf.test.Foo`
18 |     i: Foo.i,
...
27 |     repeated Bar e = 1;
28 |     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:18:8
   |
18 |     i: Foo.i,
   |        ^^^^^ expected `int32`, found `buf.test.Foo.i`
19 |     i: Foo.e,
...
27 |     repeated Bar e = 1;
28 |     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:19:8
   |
19 |     i: Foo.e,
   |        ^^^^^ expected `int32`, found `buf.test.Foo.e`
20 |     i: BAR_ZERO
...
27 |     repeated Bar e = 1;
28 |     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:20:8
   |
20 |     i: BAR_ZERO
   |        ^^^^^^^^ expected `int32`, found `buf.test.Bar`
21 |     i: buf.test.BAR_ZERO
...
27 |     repeated Bar e = 1;
28 |     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:21:8
   |
21 |     i: buf.test.BAR_ZERO
   |        ^^^^^^^^^^^^^^^^^ expected `int32`, found `buf.test.Bar`
...
27 |     repeated Bar e = 1;
28 |     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:23:9
   |
23 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |         ^^^ expected `buf.test.Bar`, found floating-point literal
...
27 |     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:23:14
   |
23 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |              ^^^^ expected `buf.test.Bar`, found `bool`
...
27 |     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:23:20
   |
23 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                    ^^^^^ expected `buf.test.Bar`, found `string`
...
27 |     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:23:27
   |
23 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                           ^^^
   |                           |
   |                           expected `buf.test.Bar`, found floating-point literal
...
27 |     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:23:32
   |
23 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                                ^^^
   |                                |
   |                                expected `buf.test.Bar`, found floating-point literal
...
27 |     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:23:37
   |
23 |     e: [1.0, true, "foo", inf, nan, {}, [], 0 to 1]
   |                                     ^^
   |                                     |
   |                                     expected `buf.test.Bar`, found message expression
...
27 |     repeated Bar e = 1;
   |     ------------ expected due to this
   |
   = note: expected: enum type `buf.test.Bar`
              found: message expression

encountered 18 errors
