rustc: treat ReEarlyBound as free without replacing it with ReFree.

This commit is contained in:
Eduard-Mihai Burtescu 2017-05-11 15:05:00 +03:00
parent dbae169ac1
commit 2da080e779
35 changed files with 250 additions and 334 deletions

View file

@ -296,8 +296,9 @@ impl<'a, 'gcx, 'tcx> Env<'a, 'gcx, 'tcx> {
pub fn re_early_bound(&self, index: u32, name: &'static str) -> ty::Region<'tcx> {
let name = Symbol::intern(name);
self.infcx.tcx.mk_region(ty::ReEarlyBound(ty::EarlyBoundRegion {
index: index,
name: name,
def_id: self.infcx.tcx.hir.local_def_id(ast::CRATE_NODE_ID),
index,
name,
}))
}