Replace many uses of ~ with `box`. #11779

`box` is the way you allocate in future-rust.