Skip to content

Commit

Permalink
stop using skip_binder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariel Ben-Yehuda committed Aug 7, 2015
1 parent 7d32533 commit 62cd3cc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use middle::def;
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};
Expand Down Expand Up @@ -477,7 +477,13 @@ pub fn get_adt_def<'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()) {
Expand Down

0 comments on commit 62cd3cc

Please sign in to comment.