aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-05-21 18:03:00 +0200
committerMarc Poulhiès <dkm@kataplop.net>2021-05-23 16:26:26 +0200
commitfd95c6cec373a79b7dc0210a55398061666fe14a (patch)
tree53209c04eb9bdaf20aff20b48168ee182369423b /gcc/rust
parent99b73780e6e30f962c01532d3ec189ceeecf7f93 (diff)
downloadgcc-fd95c6cec373a79b7dc0210a55398061666fe14a.zip
gcc-fd95c6cec373a79b7dc0210a55398061666fe14a.tar.gz
gcc-fd95c6cec373a79b7dc0210a55398061666fe14a.tar.bz2
Mention the identifier that was unused in ScanUnused.
The ScanUnused class would only mention some name was unused. Add the actual identifier name that is unused to help the user. Note that this warning might produce a similar warning as the ScanDeadcode class produces if the indentifier is a function.
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-unused.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-unused.h b/gcc/rust/resolve/rust-ast-resolve-unused.h
index bd71110..432776c 100644
--- a/gcc/rust/resolve/rust-ast-resolve-unused.h
+++ b/gcc/rust/resolve/rust-ast-resolve-unused.h
@@ -38,7 +38,7 @@ public:
if (!r->have_references_for_node (decl_node_id)
&& ident.get ().at (0) != '_')
{
- rust_warning_at (locus, 0, "unused name");
+ rust_warning_at (locus, 0, "unused name '%s'", ident.get ().c_str ());
}
return true;
});