From 6f6848909fd240d476031b6f8b968c89a352f1c8 Mon Sep 17 00:00:00 2001 From: Vincent Lafeychine <vincent.lafeychine@proton.me> Date: Sun, 14 Apr 2024 19:50:20 +0200 Subject: [PATCH] clippy!: Fix only_used_in_recursion --- rr_frontend/.cargo/config.toml | 1 - rr_frontend/translation/src/function_body.rs | 19 ------------------- 2 files changed, 20 deletions(-) diff --git a/rr_frontend/.cargo/config.toml b/rr_frontend/.cargo/config.toml index fe82a017..9640f899 100644 --- a/rr_frontend/.cargo/config.toml +++ b/rr_frontend/.cargo/config.toml @@ -21,7 +21,6 @@ rustflags = [ "-Aunused_variables", # clippy::complexity - "-Aclippy::only_used_in_recursion", "-Aclippy::unnecessary_unwrap", "-Aclippy::useless_conversion", "-Aclippy::useless_format", diff --git a/rr_frontend/translation/src/function_body.rs b/rr_frontend/translation/src/function_body.rs index f6d7cc84..a2e6ef0e 100644 --- a/rr_frontend/translation/src/function_body.rs +++ b/rr_frontend/translation/src/function_body.rs @@ -1523,25 +1523,6 @@ impl<'a, 'def: 'a, 'tcx: 'def> BodyTranslator<'a, 'def, 'tcx> { Ok(false) } - /// Get the region variables of a type (we assume that region variables have not been erased - /// yet after the borrow checker ran) and append them to `ret`. - fn get_ty_region_variables(&self, ty: Ty<'tcx>, ret: &mut Vec<Region>) { - match ty.kind() { - TyKind::Ref(reg, _, _) => { - if let ty::RegionKind::ReVar(reg2) = reg.kind() { - ret.push(reg2); - } - }, - TyKind::Tuple(_) => { - for ty0 in ty.tuple_fields() { - self.get_ty_region_variables(ty0, ret); - } - }, - // TODO also descend below structs/adts/box, like the borrowcheck does. - _ => {}, - } - } - fn get_assignment_strong_update_constraints( &mut self, loc: Location, -- GitLab