Description
I received the following error while working on an Amethyst project;
error[E0107]: wrong number of type arguments: expected at least 1, found 0
--> src/main.rs:67:26
|
67 | WriteStorage<'a, TileMap>,
| ^^^^^^^ expected at least 1 type argument
After scratching my head for a while and searching the Amethyst Discord, and finally StackOverflow, I realized I was having a brainfart and the type I was using was a generic and I wasn't fully defining it. I had been having some trouble getting an import to work successfully, so I was unsure if the type was even successfully being added to my namespace in the first place, which left me completely confused as to how to interpret this error. Was the compiler telling me 'TileMap' is not a type..??
This error does not seem in line with the level of explicitness of most of the first-pass compiler errors, and does not contain any resolution suggestions. At least one past issue exists about this particular type of error and several stackoverflow threads exist asking, essentially, 'What does this error mean?' (with successful resolutions of the form, 'That's a generic type with missing type parameters') which seems like a good indicator that the error could be more helpful and explicit. (e.g. 'This generic type is expecting _ type parameters but only found _')
This issue has been assigned to @Patryk27 via this comment.