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
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue