about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/check_const.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-05-29 09:08:22 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-05-29 10:04:08 +0000
commitceb45d55190eb00d30b8762bc4c34cf71c53b637 (patch)
treeaf6ffc2dd4e90d69a9ee6359b76b0e4ce01c633d /compiler/rustc_passes/src/check_const.rs
parent5870f1ccbbb2661c92cdc356231386210a64d723 (diff)
downloadrust-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_passes/src/check_const.rs')
-rw-r--r--compiler/rustc_passes/src/check_const.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs
index fa2c8f69c71..71f3e8b7b5d 100644
--- a/compiler/rustc_passes/src/check_const.rs
+++ b/compiler/rustc_passes/src/check_const.rs
@@ -196,7 +196,7 @@ impl<'tcx> Visitor<'tcx> for CheckConstVisitor<'tcx> {
         self.recurse_into(kind, None, |this| intravisit::walk_anon_const(this, anon));
     }
 
-    fn visit_body(&mut self, body: &'tcx hir::Body<'tcx>) {
+    fn visit_body(&mut self, body: &hir::Body<'tcx>) {
         let owner = self.tcx.hir().body_owner_def_id(body.id());
         let kind = self.tcx.hir().body_const_context(owner);
         self.recurse_into(kind, Some(owner), |this| intravisit::walk_body(this, body));