about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/rustc/middle/typeck/check/regionmanip.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rustc/middle/typeck/check/regionmanip.rs b/src/rustc/middle/typeck/check/regionmanip.rs
index 8cbc9e65d8e..5b09dd48d37 100644
--- a/src/rustc/middle/typeck/check/regionmanip.rs
+++ b/src/rustc/middle/typeck/check/regionmanip.rs
@@ -60,9 +60,14 @@ fn replace_bound_regions_in_fn_ty(
 
     // Glue updated self_ty back together with its original def_id.
     let new_self_info = match self_info {
-        some(s) => match check t_self {
-          some(t) => some({self_ty: t with s})
-          // this 'none' case shouldn't happen
+        some(s) => {
+            match t_self {
+                some(t) => some({self_ty: t with s}),
+                none => {
+                    tcx.sess.bug(~"unexpected t_self in \
+                                   replace_bound_regions_in_fn_ty()");
+                }
+            }
         },
         none => none
     };