From 0ace896d1feb5d165e24bfaeba67e113eeb4ba9b Mon Sep 17 00:00:00 2001 From: Lindsey Kuper Date: Fri, 17 Aug 2012 11:35:33 -0700 Subject: [PATCH] Remove a `match check` --- src/rustc/middle/typeck/check/regionmanip.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 };