correctly deal with late-bound lifetimes in anon consts
This commit is contained in:
@@ -1316,7 +1316,7 @@ rustc_queries! {
|
||||
desc { "looking up a named region" }
|
||||
}
|
||||
query is_late_bound_map(_: LocalDefId) ->
|
||||
Option<&'tcx FxHashSet<ItemLocalId>> {
|
||||
Option<(LocalDefId, &'tcx FxHashSet<ItemLocalId>)> {
|
||||
desc { "testing if a region is late bound" }
|
||||
}
|
||||
query object_lifetime_defaults_map(_: LocalDefId)
|
||||
|
||||
@@ -2578,7 +2578,8 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
}
|
||||
|
||||
pub fn is_late_bound(self, id: HirId) -> bool {
|
||||
self.is_late_bound_map(id.owner).map_or(false, |set| set.contains(&id.local_id))
|
||||
self.is_late_bound_map(id.owner)
|
||||
.map_or(false, |(owner, set)| owner == id.owner && set.contains(&id.local_id))
|
||||
}
|
||||
|
||||
pub fn object_lifetime_defaults(self, id: HirId) -> Option<&'tcx [ObjectLifetimeDefault]> {
|
||||
|
||||
Reference in New Issue
Block a user