error: expected map key type, found scalar type `float`
  --> testdata/fields/maps/invalid_key.proto:7:9
   |
 7 |     map<float, int32> m1 = 1;
   |         ^^^^^
   = help: valid map key types are integer types, `string`, and `bool`

error: expected map key type, found scalar type `double`
  --> testdata/fields/maps/invalid_key.proto:8:9
   |
 8 |     map<double, int32> m2 = 2;
   |         ^^^^^^
   = help: valid map key types are integer types, `string`, and `bool`

error: expected map key type, found scalar type `bytes`
  --> testdata/fields/maps/invalid_key.proto:9:9
   |
 9 |     map<bytes, int32> m3 = 3;
   |         ^^^^^
   = help: valid map key types are integer types, `string`, and `bool`

error: expected map key type, found message type `test.Foo`
  --> testdata/fields/maps/invalid_key.proto:10:9
   |
10 |     map<Foo, int32> m4 = 4;
   |         ^^^
   = help: valid map key types are integer types, `string`, and `bool`

error: expected map key type, found enum type `test.Enum`
  --> testdata/fields/maps/invalid_key.proto:11:9
   |
11 |     map<Enum, int32> m5 = 5;
   |         ^^^^
   = help: valid map key types are integer types, `string`, and `bool`
   = help: counterintuitively, user-defined enum types cannot be used as keys

encountered 5 errors
