Don't require visit_body
to take a lifetime that must outlive the function call
This commit is contained in:
parent
5870f1ccbb
commit
ceb45d5519
20 changed files with 27 additions and 31 deletions
|
@ -299,7 +299,7 @@ pub trait Visitor<'v>: Sized {
|
|||
walk_item(self, i)
|
||||
}
|
||||
|
||||
fn visit_body(&mut self, b: &'v Body<'v>) -> Self::Result {
|
||||
fn visit_body(&mut self, b: &Body<'v>) -> Self::Result {
|
||||
walk_body(self, b)
|
||||
}
|
||||
|
||||
|
@ -578,7 +578,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) -> V::
|
|||
V::Result::output()
|
||||
}
|
||||
|
||||
pub fn walk_body<'v, V: Visitor<'v>>(visitor: &mut V, body: &'v Body<'v>) -> V::Result {
|
||||
pub fn walk_body<'v, V: Visitor<'v>>(visitor: &mut V, body: &Body<'v>) -> V::Result {
|
||||
walk_list!(visitor, visit_param, body.params);
|
||||
visitor.visit_expr(body.value)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue