Error code E0390
A method or constant was implemented on a primitive type.
Erroneous code example:
ⓘ
This isn't allowed, but using a trait to implement a method or constant is a good solution. Example:
Instead of defining an inherent implementation on a reference, you could also move the reference inside the implementation:
ⓘ
becomes