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:
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user