Switched to Box::new in many places.

Many of the modifications putting in `Box::new` calls also include a
pointer to Issue 22405, which tracks going back to `box <expr>` if
possible in the future.

(Still tried to use `Box<_>` where it sufficed; thus some tests still
have `box_syntax` enabled, as they use a mix of `box` and `Box::new`.)

Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
This commit is contained in:
Felix S. Klock II
2015-02-15 09:52:21 +01:00
parent b03279aaa2
commit 0d5bcb14ad
118 changed files with 349 additions and 373 deletions

View File

@@ -1484,8 +1484,9 @@ mod test {
use std::old_io::util;
fn mk_sh() -> diagnostic::SpanHandler {
let emitter = diagnostic::EmitterWriter::new(box util::NullWriter, None);
let handler = diagnostic::mk_handler(true, box emitter);
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
let emitter = diagnostic::EmitterWriter::new(Box::new(util::NullWriter), None);
let handler = diagnostic::mk_handler(true, Box::new(emitter));
diagnostic::mk_span_handler(handler, CodeMap::new())
}