Closed
Description
I'm working on #16918, and as part of the DSTification of Hash
, I'm adding tests to make sure that hashing Box<[T]>
and Box<str>
work. But there doesn't seem to be a way to create a boxed str.
I tried the following:
fn main() {
let _: Box<str> = box "a";
//^~ error: mismatched types: expected `Box<str>`, found `Box<&'static str>`
let _: Box<str> = box *"a";
//^~ error: cannot move a value of type str: the size of str cannot be statically determined
}
cc @nick29581