aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-unused.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-unused.h')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-unused.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-unused.h b/gcc/rust/resolve/rust-ast-resolve-unused.h
index 18d02a1..b8b50a0 100644
--- a/gcc/rust/resolve/rust-ast-resolve-unused.h
+++ b/gcc/rust/resolve/rust-ast-resolve-unused.h
@@ -27,7 +27,7 @@ namespace Resolver {
class ScanUnused
{
public:
- static void ScanRib (Rib *r)
+ static bool ScanRib (Rib *r)
{
r->iterate_decls ([&] (NodeId decl_node_id, Location locus) -> bool {
CanonicalPath ident = CanonicalPath::create_empty ();
@@ -43,14 +43,15 @@ public:
}
return true;
});
+ return true;
}
static void Scan ()
{
auto resolver = Resolver::get ();
- resolver->iterate_name_ribs ([&] (Rib *r) -> void { ScanRib (r); });
- resolver->iterate_type_ribs ([&] (Rib *r) -> void { ScanRib (r); });
- resolver->iterate_label_ribs ([&] (Rib *r) -> void { ScanRib (r); });
+ resolver->iterate_name_ribs ([&] (Rib *r) -> bool { return ScanRib (r); });
+ resolver->iterate_type_ribs ([&] (Rib *r) -> bool { return ScanRib (r); });
+ resolver->iterate_label_ribs ([&] (Rib *r) -> bool { return ScanRib (r); });
}
};