aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Young <wenzhang5800@gmail.com>2021-07-06 15:42:23 +0800
committerThomas Young <wenzhang5800@gmail.com>2021-07-06 15:42:23 +0800
commit4fd6415421272a352a2b7c4ac3bd26c463c83b2c (patch)
treefd1bbd9deade3d928c3efe0a720745f54b799fd2
parent630efc56d1059bac464b38807dab58cd322f7a7f (diff)
downloadgcc-4fd6415421272a352a2b7c4ac3bd26c463c83b2c.zip
gcc-4fd6415421272a352a2b7c4ac3bd26c463c83b2c.tar.gz
gcc-4fd6415421272a352a2b7c4ac3bd26c463c83b2c.tar.bz2
make the warning msg be searched easier
-rw-r--r--gcc/rust/lint/rust-lint-scan-deadcode.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/rust/lint/rust-lint-scan-deadcode.h b/gcc/rust/lint/rust-lint-scan-deadcode.h
index 6ecf3a5..c50159f 100644
--- a/gcc/rust/lint/rust-lint-scan-deadcode.h
+++ b/gcc/rust/lint/rust-lint-scan-deadcode.h
@@ -48,8 +48,8 @@ public:
HirId hirId = function.get_mappings ().get_hirid ();
if (should_warn (hirId))
{
- rust_warning_at (function.get_locus (), 0, "%s is never %s: %<%s%>",
- "function", "used",
+ rust_warning_at (function.get_locus (), 0,
+ "function is never used: %<%s%>",
function.get_function_name ().c_str ());
}
}
@@ -59,8 +59,8 @@ public:
HirId hirId = stct.get_mappings ().get_hirid ();
if (should_warn (hirId))
{
- rust_warning_at (stct.get_locus (), 0, "%s is never %s: %<%s%>",
- "struct", "constructed",
+ rust_warning_at (stct.get_locus (), 0,
+ "struct is never constructed: %<%s%>",
stct.get_identifier ().c_str ());
}
else
@@ -70,8 +70,8 @@ public:
HirId field_hir_id = field.get_mappings ().get_hirid ();
if (should_warn (field_hir_id))
{
- rust_warning_at (field.get_locus (), 0, "%s is never %s: %<%s%>",
- "field", "read",
+ rust_warning_at (field.get_locus (), 0,
+ "field is never read: %<%s%>",
field.get_field_name ().c_str ());
}
return true;
@@ -85,8 +85,8 @@ public:
HirId hirId = stct.get_mappings ().get_hirid ();
if (should_warn (hirId))
{
- rust_warning_at (stct.get_locus (), 0, "%s is never %s: %<%s%>",
- "struct", "constructed",
+ rust_warning_at (stct.get_locus (), 0,
+ "struct is never constructed: %<%s%>",
stct.get_identifier ().c_str ());
}
}