Closed
Description
While looking at #22205, I tried this as a workaround:
struct NonCopy;
fn main() {
let x = Box::new(NonCopy);
let Box(y) = x;
}
However, this has the error:
<anon>:5:9: 5:15 error: mismatched types:
expected `Box<NonCopy>`,
found `alloc::boxed::Box<_>`
(expected box,
found struct `alloc::boxed::Box`) [E0308]
<anon>:5 let Box(y) = x;
^~~~~~