Skip to content
Snippets Groups Projects
Verified Commit 6f684890 authored by Vincent Lafeychine's avatar Vincent Lafeychine
Browse files

clippy!: Fix only_used_in_recursion

parent 68ad99cd
No related branches found
No related tags found
1 merge request!33Fix most of clippy::complexity and clippy::correctness
......@@ -21,7 +21,6 @@ rustflags = [
"-Aunused_variables",
# clippy::complexity
"-Aclippy::only_used_in_recursion",
"-Aclippy::unnecessary_unwrap",
"-Aclippy::useless_conversion",
"-Aclippy::useless_format",
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment