On Thu, Jun 25, 2015 at 8:33 PM David DENG <
david...@gmail.com> wrote:
Conversion between any types having the same underlying type is permitted by the specs[0]:
""""
A non-constant value x can be converted to type T in any of these cases:
...
x's type and T have identical underlying types.
...
""""
However, in the case you seem to be looking for, the underlying types are not the same.
If such conversions between [slice] types of different underlying types would be permitted then the conversion would have to convert and copy the slice elements one by one - in the general case, as there's no guarantee that the memory layout is compatible.