about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLindsey Kuper <lindsey@rockstargirl.org>2012-06-27 12:24:38 -0700
committerLindsey Kuper <lindsey@rockstargirl.org>2012-06-27 12:37:50 -0700
commitf0565be49a4263ca0582acc64102051da1434cff (patch)
tree5385d16788704e5ba0f4b933ef9f8daedcfc8516
parent133fdc11484794274b0c9b7dca9f05196d3ed01d (diff)
Better error message instead of bare "fail" in infer
-rw-r--r--src/rustc/middle/typeck/infer.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rustc/middle/typeck/infer.rs b/src/rustc/middle/typeck/infer.rs
index 61d29a84088..9f941871692 100644
--- a/src/rustc/middle/typeck/infer.rs
+++ b/src/rustc/middle/typeck/infer.rs
@@ -664,10 +664,10 @@ impl unify_methods for infer_ctxt {
         vb: vals_and_bindings<V, T>, vid: V)
         -> node<V, T> {
 
-        alt vb.vals.find(vid.to_uint()) {
+        let vid_u = vid.to_uint();
+        alt vb.vals.find(vid_u) {
           none {
-            #error["failed lookup in infcx.get()"];
-            fail;
+            self.tcx.sess.bug(#fmt["failed lookup of vid `%u`", vid_u]);
           }
           some(var_val) {
             alt var_val {