Remove unnecessary lifetime from UnsafeInferVarsVisitor.

This commit is contained in:
Nicholas Nethercote 2024-09-06 19:41:25 +10:00
parent 2e8db5e9e3
commit d0be42d9f0

View File

@ -603,12 +603,12 @@ fn compute_unsafe_infer_vars<'a, 'tcx>(
root_ctxt.tcx.hir().maybe_body_owned_by(body_id).expect("body id must have an owner");
let mut res = UnordMap::default();
struct UnsafeInferVarsVisitor<'a, 'tcx, 'r> {
struct UnsafeInferVarsVisitor<'a, 'tcx> {
root_ctxt: &'a TypeckRootCtxt<'tcx>,
res: &'r mut UnordMap<ty::TyVid, (HirId, Span, UnsafeUseReason)>,
res: &'a mut UnordMap<ty::TyVid, (HirId, Span, UnsafeUseReason)>,
}
impl Visitor<'_> for UnsafeInferVarsVisitor<'_, '_, '_> {
impl Visitor<'_> for UnsafeInferVarsVisitor<'_, '_> {
fn visit_expr(&mut self, ex: &'_ hir::Expr<'_>) {
let typeck_results = self.root_ctxt.typeck_results.borrow();