Use box for Diagnostic

This commit is contained in:
강동윤 2018-01-21 19:33:27 +09:00
parent 4d52cb49d4
commit e75836882b

View File

@ -6,7 +6,7 @@ use std::fmt;
#[must_use] #[must_use]
pub struct Diagnostic<'a> { pub struct Diagnostic<'a> {
db: Builder<'a>, db: Box<Builder<'a>>,
} }
impl<'a> Diagnostic<'a> { impl<'a> Diagnostic<'a> {
@ -21,7 +21,7 @@ impl<'a> Diagnostic<'a> {
msg: &str, msg: &str,
) -> Self { ) -> Self {
Diagnostic { Diagnostic {
db: Builder::new_diagnostic( db: box Builder::new_diagnostic(
&handler.inner, &handler.inner,
RustcDiagnostic::new_with_code(level, code, msg), RustcDiagnostic::new_with_code(level, code, msg),
), ),