Fix some missing cases

This commit is contained in:
Niko Matsakis 2015-04-17 10:05:25 -04:00
parent 39b79285be
commit 5368070228
2 changed files with 7 additions and 2 deletions

View File

@ -290,7 +290,12 @@ impl<'a, 'tcx> Env<'a, 'tcx> {
-> ty::Region
{
let name = token::intern(name);
ty::ReEarlyBound(ast::DUMMY_NODE_ID, space, index, name)
ty::ReEarlyBound(ty::EarlyBoundRegion {
param_id: ast::DUMMY_NODE_ID,
space: space,
index: index,
name: name
})
}
pub fn re_late_bound_with_debruijn(&self, id: u32, debruijn: ty::DebruijnIndex) -> ty::Region {

View File

@ -775,7 +775,7 @@ impl Clean<Option<Lifetime>> for ty::Region {
ty::ReStatic => Some(Lifetime::statik()),
ty::ReLateBound(_, ty::BrNamed(_, name)) =>
Some(Lifetime(token::get_name(name).to_string())),
ty::ReEarlyBound(_, _, _, name) => Some(Lifetime(name.clean(cx))),
ty::ReEarlyBound(ref data) => Some(Lifetime(data.name.clean(cx))),
ty::ReLateBound(..) |
ty::ReFree(..) |