}
def_id
}
+
+ /// Given the def-id of some item that has no type parameters, make
+ /// a suitable "empty substs" for it.
+ pub fn empty_substs_for_def_id(self, item_def_id: DefId) -> &'tcx ty::Substs<'tcx> {
+ ty::Substs::for_item(self, item_def_id,
+ |_, _| self.mk_region(ty::ReErased),
+ |_, _| {
+ bug!("empty_substs_for_def_id: {:?} has type parameters", item_def_id)
+ })
+ }
+
+
}
pub struct TypeIdHasher<'a, 'gcx: 'a+'tcx, 'tcx: 'a, W> {