thir::Visitor
only needs to visit &'thir
data
This commit is contained in:
parent
4ae024c754
commit
2b4f84f2b2
4 changed files with 43 additions and 28 deletions
|
@ -379,7 +379,7 @@ impl<'a, 'tcx> visit::Visitor<'a, 'tcx> for IsThirPolymorphic<'a, 'tcx> {
|
|||
}
|
||||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn visit_expr(&mut self, expr: &thir::Expr<'tcx>) {
|
||||
fn visit_expr(&mut self, expr: &'a thir::Expr<'tcx>) {
|
||||
self.is_poly |= self.expr_is_poly(expr);
|
||||
if !self.is_poly {
|
||||
visit::walk_expr(self, expr)
|
||||
|
@ -387,7 +387,7 @@ impl<'a, 'tcx> visit::Visitor<'a, 'tcx> for IsThirPolymorphic<'a, 'tcx> {
|
|||
}
|
||||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn visit_pat(&mut self, pat: &thir::Pat<'tcx>) {
|
||||
fn visit_pat(&mut self, pat: &'a thir::Pat<'tcx>) {
|
||||
self.is_poly |= self.pat_is_poly(pat);
|
||||
if !self.is_poly {
|
||||
visit::walk_pat(self, pat);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue