Typechecker and Trait: I don't understand an error message


In this code, I do not understand why the Rust type checker is unhappy. The types T and Id seem completely unrelated, so why (1) is Rust telling me that Clone is not implemented for T, (2) the declaration of the Id const given as the error for why the type T not being Clone underlined?


This is a known bug with Associated Constants. They can only be used in contexts where there are no generic parameters.


Ah, too bad. Thanks for the information.