diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-05-29 09:08:22 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-05-29 10:04:08 +0000 |
| commit | ceb45d55190eb00d30b8762bc4c34cf71c53b637 (patch) | |
| tree | af6ffc2dd4e90d69a9ee6359b76b0e4ce01c633d /compiler/rustc_hir/src | |
| parent | 5870f1ccbbb2661c92cdc356231386210a64d723 (diff) | |
| download | rust-ceb45d55190eb00d30b8762bc4c34cf71c53b637.tar.gz rust-ceb45d55190eb00d30b8762bc4c34cf71c53b637.zip | |
Don't require `visit_body` to take a lifetime that must outlive the function call
Diffstat (limited to 'compiler/rustc_hir/src')
| -rw-r--r-- | compiler/rustc_hir/src/intravisit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs index aba0532f0d1..63ddb22c5ab 100644 --- a/compiler/rustc_hir/src/intravisit.rs +++ b/compiler/rustc_hir/src/intravisit.rs @@ -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) } |
