error: expected message type, found enum type `buf.test.E`
  --> testdata/services/wrong_type.proto:9:24
   |
 6 | enum E { Z = 0; }
   |      - defined here
...
 9 |     rpc M1(M) returns (E);
   |                        ^ expected message type

error: expected message type, found enum type `buf.test.E`
  --> testdata/services/wrong_type.proto:10:19
   |
 6 | enum E { Z = 0; }
   |      - defined here
...
 9 |     rpc M1(M) returns (E);
10 |     rpc M2(stream E) returns (M);
   |                   ^ expected message type

error: expected message type, found scalar type `int32`
  --> testdata/services/wrong_type.proto:11:31
   |
11 |     rpc M3(M) returns (stream int32);
   |                               ^^^^^ expected message type

error: expected message type, found scalar type `string`
  --> testdata/services/wrong_type.proto:12:19
   |
12 |     rpc M4(stream string) returns (stream N);
   |                   ^^^^^^ expected message type

error: cannot find `N` in this scope
  --> testdata/services/wrong_type.proto:12:43
   |
12 |     rpc M4(stream string) returns (stream N);
   |                                           ^ not found in this scope
   |
   = help: the full name of this scope is `buf.test.S`

encountered 5 errors
