From 62cd3cc46b533c3d1b6c94cc1d13a3be8a8c23ab Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Fri, 7 Aug 2015 13:57:39 +0300 Subject: [PATCH] stop using skip_binder --- src/librustc/metadata/decoder.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs index 38f90e682be..b0f7bab6c59 100644 --- a/src/librustc/metadata/decoder.rs +++ b/src/librustc/metadata/decoder.rs @@ -30,7 +30,7 @@ use middle::lang_items; use middle::subst; use middle::ty::{ImplContainer, TraitContainer}; -use middle::ty::{self, Ty}; +use middle::ty::{self, RegionEscape, Ty}; use util::nodemap::FnvHashMap; use std::cell::{Cell, RefCell}; @@ -477,7 +477,13 @@ fn get_struct_variant<'tcx>(intr: &IdentInterner, variant.name, ctor_ty); let field_tys = match ctor_ty.sty { - ty::TyBareFn(_, ref f) => &f.sig.skip_binder().inputs, + ty::TyBareFn(_, &ty::BareFnTy { sig: ty::Binder(ty::FnSig { + ref inputs, .. + }), ..}) => { + // tuple-struct constructors don't have escaping regions + assert!(!inputs.has_escaping_regions()); + inputs + }, _ => tcx.sess.bug("tuple-variant ctor is not an ADT") }; for (field, &ty) in variant.fields.iter().zip(field_tys.iter()) {