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
|
@ -1163,7 +1163,7 @@ impl<'a, 'tcx> Visitor<'tcx> for FindInferSourceVisitor<'a, 'tcx> {
|
|||
|
||||
/// For closures, we first visit the parameters and then the content,
|
||||
/// as we prefer those.
|
||||
fn visit_body(&mut self, body: &'tcx Body<'tcx>) {
|
||||
fn visit_body(&mut self, body: &Body<'tcx>) {
|
||||
for param in body.params {
|
||||
debug!(
|
||||
"param: span {:?}, ty_span {:?}, pat.span {:?}",
|
||||
|
|
|
@ -578,10 +578,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
walk_stmt(self, ex)
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_body(&mut self, body: &'v hir::Body<'v>) -> Self::Result {
|
||||
hir::intravisit::walk_body(self, body)
|
||||
}
|
||||
}
|
||||
|
||||
self.tcx.hir().maybe_body_owned_by(cause.body_id).and_then(|body_id| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue