S0121: generic type requires type arguments
Generated from rellum-diagnostics/src/db.rs.
Explanation
A generic type template is not a concrete type by itself. Each use in a type annotation must provide concrete type arguments so the compiler can instantiate a layout.
Common causes
- using a generic record or enum name without [T] arguments
- forgetting to update annotations after making a type generic
- expecting generic type arguments to be inferred from an annotation
Canonical fixes
- provide the required type arguments
Before:
value: Box = Box { value: 1 }
After:
value: Box[Int] = Box { value: 1 }
- remove type parameters from the type definition if it should not be generic
Code example
value: Box = Box { value: 1 }