Enter a scope with the given name and push it onto the stack of scopes. It will be a child scope of the current top of the stack.
(&mut self, name: &'static str)
| 134 | |
| 135 | /// Enter a scope with the given name and push it onto the stack of scopes. It will be a child scope of the current top of the stack. |
| 136 | pub fn enter(&mut self, name: &'static str) -> (Guard, ScopeId) { |
| 137 | // TODO: If the scope on top of the stack has the same name, use the next one as parent, to avoid huge chains for recursive functions |
| 138 | let id = self.new_id(name, self.scope_stack.last()); |
| 139 | self.enter_with_id(name, id) |
| 140 | } |
| 141 | |
| 142 | /// Enter a scope with the given name and push it onto the stack of scopes. It will be manually assigned as a child of the given parent scope. |
| 143 | pub fn enter_with_parent(&mut self, name: &'static str, parent: &ScopeId) -> (Guard, ScopeId) { |
nothing calls this directly
no test coverage detected