Generic size_of in array constructor


I’ve got this sample code here:

Function g returns the size of a type T. f constructs an array with element type T and of length size of T. They both use size_of. g compiles. f doesn’t. What am I doing wrong?


This is a known bug where trait bounds aren’t applied in that location: