diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-15 09:52:21 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-03-03 21:05:55 +0100 |
| commit | 0d5bcb14adb71900a99f06b92485de7e019734c2 (patch) | |
| tree | 37b9faace62c6658ff6ecf9d646e04c01be875fb /src/libsyntax/parse | |
| parent | b03279aaa2b20f6033e66fc7aea29c0b43e71082 (diff) | |
| download | rust-0d5bcb14adb71900a99f06b92485de7e019734c2.tar.gz rust-0d5bcb14adb71900a99f06b92485de7e019734c2.zip | |
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.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 83d2bb0cc70..bbe1ddfd4cf 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -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()) } |
