error: unexpected service definition within message definition
  --> testdata/parser/def/nesting.proto:8:5
   |
 5 | / message M {
 6 | |     message M {}
 7 | |     enum E {}
 8 | |     service S {}
   | |     ^^^^^^^^^^^^ this service definition...
 9 | |     extend E {}
10 | |     oneof O {}
11 | | }
   | \_- ...cannot be declared within this message definition
   |
   = help: this service definition can only appear at file scope

error: unexpected message definition within enum definition
  --> testdata/parser/def/nesting.proto:14:5
   |
13 | / enum E {
14 | |     message M {}
   | |     ^^^^^^^^^^^^ this message definition...
15 | |     enum E {}
...  |
19 | | }
   | \_- ...cannot be declared within this enum definition
   |
   = help: this message definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected enum definition within enum definition
  --> testdata/parser/def/nesting.proto:15:5
   |
13 | / enum E {
14 | |     message M {}
15 | |     enum E {}
   | |     ^^^^^^^^^ this enum definition...
16 | |     service S {}
...  |
19 | | }
   | \_- ...cannot be declared within this enum definition
   |
   = help: this enum definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected service definition within enum definition
  --> testdata/parser/def/nesting.proto:16:5
   |
13 | / enum E {
14 | |     message M {}
15 | |     enum E {}
16 | |     service S {}
   | |     ^^^^^^^^^^^^ this service definition...
17 | |     extend E {}
18 | |     oneof O {}
19 | | }
   | \_- ...cannot be declared within this enum definition
   |
   = help: this service definition can only appear at file scope

error: unexpected message extension block within enum definition
  --> testdata/parser/def/nesting.proto:17:5
   |
13 | / enum E {
...  |
16 | |     service S {}
17 | |     extend E {}
   | |     ^^^^^^^^^^^ this message extension block...
18 | |     oneof O {}
19 | | }
   | \_- ...cannot be declared within this enum definition
   |
   = help: this message extension block can only appear within one of file
           scope, message definition, or group definition

error: unexpected oneof definition within enum definition
  --> testdata/parser/def/nesting.proto:18:5
   |
13 | / enum E {
...  |
17 | |     extend E {}
18 | |     oneof O {}
   | |     ^^^^^^^^^^ this oneof definition...
19 | | }
   | \_- ...cannot be declared within this enum definition
   |
   = help: this oneof definition can only appear within one of message
           definition or group definition

error: unexpected message definition within service definition
  --> testdata/parser/def/nesting.proto:22:5
   |
21 | / service S {
22 | |     message M {}
   | |     ^^^^^^^^^^^^ this message definition...
23 | |     enum E {}
...  |
27 | | }
   | \_- ...cannot be declared within this service definition
   |
   = help: this message definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected enum definition within service definition
  --> testdata/parser/def/nesting.proto:23:5
   |
21 | / service S {
22 | |     message M {}
23 | |     enum E {}
   | |     ^^^^^^^^^ this enum definition...
24 | |     service S {}
...  |
27 | | }
   | \_- ...cannot be declared within this service definition
   |
   = help: this enum definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected service definition within service definition
  --> testdata/parser/def/nesting.proto:24:5
   |
21 | / service S {
22 | |     message M {}
23 | |     enum E {}
24 | |     service S {}
   | |     ^^^^^^^^^^^^ this service definition...
25 | |     extend E {}
26 | |     oneof O {}
27 | | }
   | \_- ...cannot be declared within this service definition
   |
   = help: this service definition can only appear at file scope

error: unexpected message extension block within service definition
  --> testdata/parser/def/nesting.proto:25:5
   |
21 | / service S {
...  |
24 | |     service S {}
25 | |     extend E {}
   | |     ^^^^^^^^^^^ this message extension block...
26 | |     oneof O {}
27 | | }
   | \_- ...cannot be declared within this service definition
   |
   = help: this message extension block can only appear within one of file
           scope, message definition, or group definition

error: unexpected oneof definition within service definition
  --> testdata/parser/def/nesting.proto:26:5
   |
21 | / service S {
...  |
25 | |     extend E {}
26 | |     oneof O {}
   | |     ^^^^^^^^^^ this oneof definition...
27 | | }
   | \_- ...cannot be declared within this service definition
   |
   = help: this oneof definition can only appear within one of message
           definition or group definition

error: unexpected message definition within message extension block
  --> testdata/parser/def/nesting.proto:30:5
   |
29 | / extend E {
30 | |     message M {}
   | |     ^^^^^^^^^^^^ this message definition...
31 | |     enum E {}
...  |
35 | | }
   | \_- ...cannot be declared within this message extension block
   |
   = help: this message definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected enum definition within message extension block
  --> testdata/parser/def/nesting.proto:31:5
   |
29 | / extend E {
30 | |     message M {}
31 | |     enum E {}
   | |     ^^^^^^^^^ this enum definition...
32 | |     service S {}
...  |
35 | | }
   | \_- ...cannot be declared within this message extension block
   |
   = help: this enum definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected service definition within message extension block
  --> testdata/parser/def/nesting.proto:32:5
   |
29 | / extend E {
30 | |     message M {}
31 | |     enum E {}
32 | |     service S {}
   | |     ^^^^^^^^^^^^ this service definition...
33 | |     extend E {}
34 | |     oneof O {}
35 | | }
   | \_- ...cannot be declared within this message extension block
   |
   = help: this service definition can only appear at file scope

error: unexpected message extension block within message extension block
  --> testdata/parser/def/nesting.proto:33:5
   |
29 | / extend E {
...  |
32 | |     service S {}
33 | |     extend E {}
   | |     ^^^^^^^^^^^ this message extension block...
34 | |     oneof O {}
35 | | }
   | \_- ...cannot be declared within this message extension block
   |
   = help: this message extension block can only appear within one of file
           scope, message definition, or group definition

error: unexpected oneof definition within message extension block
  --> testdata/parser/def/nesting.proto:34:5
   |
29 | / extend E {
...  |
33 | |     extend E {}
34 | |     oneof O {}
   | |     ^^^^^^^^^^ this oneof definition...
35 | | }
   | \_- ...cannot be declared within this message extension block
   |
   = help: this oneof definition can only appear within one of message
           definition or group definition

error: unexpected oneof definition at file scope
  --> testdata/parser/def/nesting.proto:37:1
   |
37 | / oneof O {
...  |
43 | | }
   | \_^ this oneof definition cannot be declared here
   |
   = help: this oneof definition can only appear within one of message
           definition or group definition

error: unexpected message definition within oneof definition
  --> testdata/parser/def/nesting.proto:38:5
   |
37 | / oneof O {
38 | |     message M {}
   | |     ^^^^^^^^^^^^ this message definition...
39 | |     enum E {}
...  |
43 | | }
   | \_- ...cannot be declared within this oneof definition
   |
   = help: this message definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected enum definition within oneof definition
  --> testdata/parser/def/nesting.proto:39:5
   |
37 | / oneof O {
38 | |     message M {}
39 | |     enum E {}
   | |     ^^^^^^^^^ this enum definition...
40 | |     service S {}
...  |
43 | | }
   | \_- ...cannot be declared within this oneof definition
   |
   = help: this enum definition can only appear within one of file scope,
           message definition, or group definition

error: unexpected service definition within oneof definition
  --> testdata/parser/def/nesting.proto:40:5
   |
37 | / oneof O {
38 | |     message M {}
39 | |     enum E {}
40 | |     service S {}
   | |     ^^^^^^^^^^^^ this service definition...
41 | |     extend E {}
42 | |     oneof O {}
43 | | }
   | \_- ...cannot be declared within this oneof definition
   |
   = help: this service definition can only appear at file scope

error: unexpected message extension block within oneof definition
  --> testdata/parser/def/nesting.proto:41:5
   |
37 | / oneof O {
...  |
40 | |     service S {}
41 | |     extend E {}
   | |     ^^^^^^^^^^^ this message extension block...
42 | |     oneof O {}
43 | | }
   | \_- ...cannot be declared within this oneof definition
   |
   = help: this message extension block can only appear within one of file
           scope, message definition, or group definition

error: unexpected oneof definition within oneof definition
  --> testdata/parser/def/nesting.proto:42:5
   |
37 | / oneof O {
...  |
41 | |     extend E {}
42 | |     oneof O {}
   | |     ^^^^^^^^^^ this oneof definition...
43 | | }
   | \_- ...cannot be declared within this oneof definition
   |
   = help: this oneof definition can only appear within one of message
           definition or group definition

encountered 22 errors
