mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 19:43:24 +00:00
middle: region: remove dead code
This commit is contained in:
parent
39fce48324
commit
ee82233a1e
@ -149,6 +149,7 @@ impl RegionMaps {
|
||||
self.scope_map.borrow().find(&id).map(|x| *x)
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // used in middle::cfg
|
||||
pub fn encl_scope(&self, id: ast::NodeId) -> ast::NodeId {
|
||||
//! Returns the narrowest scope that encloses `id`, if any.
|
||||
match self.scope_map.borrow().find(&id) {
|
||||
@ -203,12 +204,6 @@ impl RegionMaps {
|
||||
return Some(id);
|
||||
}
|
||||
|
||||
pub fn encl_region(&self, id: ast::NodeId) -> ty::Region {
|
||||
//! Returns the narrowest scope region that encloses `id`, if any.
|
||||
|
||||
ty::ReScope(self.encl_scope(id))
|
||||
}
|
||||
|
||||
pub fn var_region(&self, id: ast::NodeId) -> ty::Region {
|
||||
//! Returns the lifetime of the variable `id`.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user