diff --git a/src/rustc/middle/typeck/check/regionmanip.rs b/src/rustc/middle/typeck/check/regionmanip.rs index 8cbc9e65d8ec..5b09dd48d37c 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 };