Closed
Description
Intuitively, I would expect b"abc"
to behave identically to &[97, 98, 99]
, but it does not: b"abc"
is of type &[u8]
instead of &[u8, ..3]
like &[97, 98, 99]
is. Changing this to &[u8, ..n]
would provide more flexibility, as &[u8, ..n]
can always be converted to &[u8]
, but not vice-versa.
Presumably this was either intentional or simply forgotten during the slice-related DST changes.