about summary refs log tree commit diff
path: root/src/rustc/metadata/decoder.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-05-14 20:41:33 -0700
committerBrian Anderson <banderson@mozilla.com>2012-05-14 20:41:33 -0700
commit452fc46ffcff5b7e1dfc475b892bef8c0547e7e1 (patch)
treedc31b62a5557042fba54e69e50b35ef5fae4dec1 /src/rustc/metadata/decoder.rs
parent0f49928c2d2a5a35e4a103fbe93481621694c912 (diff)
downloadrust-452fc46ffcff5b7e1dfc475b892bef8c0547e7e1.tar.gz
rust-452fc46ffcff5b7e1dfc475b892bef8c0547e7e1.zip
rustc: Break some of metadata's dependencies on session
Diffstat (limited to 'src/rustc/metadata/decoder.rs')
-rw-r--r--src/rustc/metadata/decoder.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rustc/metadata/decoder.rs b/src/rustc/metadata/decoder.rs
index b91deaddba7..1c8caa0f4aa 100644
--- a/src/rustc/metadata/decoder.rs
+++ b/src/rustc/metadata/decoder.rs
@@ -4,7 +4,6 @@ import std::{ebml, map};
 import std::map::hashmap;
 import io::writer_util;
 import syntax::{ast, ast_util};
-import driver::session::session;
 import syntax::attr;
 import middle::ty;
 import middle::ast_map;
@@ -15,6 +14,7 @@ import syntax::print::pprust;
 import cmd=cstore::crate_metadata;
 import util::ppaux::ty_to_str;
 import ebml::deserializer;
+import syntax::diagnostic::span_handler;
 
 export get_class_fields;
 export get_symbol;
@@ -455,7 +455,9 @@ fn get_iface_methods(cdata: cmd, id: ast::node_id, tcx: ty::ctxt)
         let name = item_name(mth);
         let ty = doc_type(mth, tcx, cdata);
         let fty = alt ty::get(ty).struct { ty::ty_fn(f) { f }
-          _ { tcx.sess.bug("get_iface_methods: id has non-function type");
+          _ {
+            tcx.diag.handler().bug(
+                "get_iface_methods: id has non-function type");
         } };
         result += [{ident: name, tps: bounds, fty: fty,
                     purity: alt check item_family(mth) {