about summary refs log tree commit diff
path: root/src/librustc_metadata/tyencode.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-12-18 13:43:45 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-12-18 16:47:37 +0530
commitc2902965cb53d2afd09ea2ce7b3f9c314dc7b072 (patch)
tree83b7c8e4e6118bfaa26d7be0d82923537c663bcf /src/librustc_metadata/tyencode.rs
parentcb319fc84fa52773dd31ead8761b1c251e916e88 (diff)
parentff0c74f7d47f5261ebda7cb3b9a637e0cfc69104 (diff)
Rollup merge of #30384 - nrc:diagnostics, r=@nikomatsakis
Should make it possible to add JSON or HTML errors. Also tidies up a lot.
Diffstat (limited to 'src/librustc_metadata/tyencode.rs')
-rw-r--r--src/librustc_metadata/tyencode.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_metadata/tyencode.rs b/src/librustc_metadata/tyencode.rs
index c1910e3f249..0119f1d5cc1 100644
--- a/src/librustc_metadata/tyencode.rs
+++ b/src/librustc_metadata/tyencode.rs
@@ -29,14 +29,14 @@ use rustc_front::hir;
 
 use syntax::abi::Abi;
 use syntax::ast;
-use syntax::diagnostic::SpanHandler;
+use syntax::errors::Handler;
 
 use rbml::writer::{self, Encoder};
 
 macro_rules! mywrite { ($w:expr, $($arg:tt)*) => ({ write!($w.writer, $($arg)*); }) }
 
 pub struct ctxt<'a, 'tcx: 'a> {
-    pub diag: &'a SpanHandler,
+    pub diag: &'a Handler,
     // Def -> str Callback:
     pub ds: fn(DefId) -> String,
     // The type context.
@@ -136,7 +136,7 @@ pub fn enc_ty<'a, 'tcx>(w: &mut Encoder, cx: &ctxt<'a, 'tcx>, t: Ty<'tcx>) {
             enc_bare_fn_ty(w, cx, f);
         }
         ty::TyInfer(_) => {
-            cx.diag.handler().bug("cannot encode inference variable types");
+            cx.diag.bug("cannot encode inference variable types");
         }
         ty::TyParam(ParamTy {space, idx, name}) => {
             mywrite!(w, "p[{}|{}|{}]", idx, space.to_uint(), name)
@@ -279,7 +279,7 @@ pub fn enc_region(w: &mut Encoder, cx: &ctxt, r: ty::Region) {
         }
         ty::ReVar(_) | ty::ReSkolemized(..) => {
             // these should not crop up after typeck
-            cx.diag.handler().bug("cannot encode region variables");
+            cx.diag.bug("cannot encode region variables");
         }
     }
 }