syntax: refactor (Span)Handler and ParseSess constructors to be methods.

This commit is contained in:
Eduard Burtescu
2015-05-13 23:00:17 +03:00
parent 6a045b9d1c
commit f786437bd2
17 changed files with 62 additions and 65 deletions

View File

@@ -1406,8 +1406,8 @@ mod tests {
fn mk_sh() -> diagnostic::SpanHandler {
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
let emitter = diagnostic::EmitterWriter::new(Box::new(io::sink()), None);
let handler = diagnostic::mk_handler(true, Box::new(emitter));
diagnostic::mk_span_handler(handler, CodeMap::new())
let handler = diagnostic::Handler::with_emitter(true, Box::new(emitter));
diagnostic::SpanHandler::new(handler, CodeMap::new())
}
// open a string reader for the given string