about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLucas Scharenbroch <lucasscharenbroch@gmail.com>2024-05-30 21:39:41 -0500
committerLucas Scharenbroch <lucasscharenbroch@gmail.com>2024-05-30 21:39:41 -0500
commit9af96745d693b5b263fab27c84d7cb55465ca09b (patch)
treedb1c4367f50f8b74bdcfcbcbd87391ec8589d402
parent08fe940f0a47f7281ec916a924ec978cac994491 (diff)
downloadrust-9af96745d693b5b263fab27c84d7cb55465ca09b.tar.gz
rust-9af96745d693b5b263fab27c84d7cb55465ca09b.zip
Update ui tests for leading-underscore suggestion
-rw-r--r--tests/ui/macros/expand-full-no-resolution.stderr4
-rw-r--r--tests/ui/suggestions/silenced-binding-typo.stderr4
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/ui/macros/expand-full-no-resolution.stderr b/tests/ui/macros/expand-full-no-resolution.stderr
index 2537a5032a9..df6f20332bf 100644
--- a/tests/ui/macros/expand-full-no-resolution.stderr
+++ b/tests/ui/macros/expand-full-no-resolution.stderr
@@ -7,7 +7,7 @@ LL |         macro_rules! _a {
 LL |     format_args!(a!());
    |                  ^
    |
-help: a macro with a similar name exists, consider renaming `_a` into `a`
+help: the leading underscore in `_a` marks it as unused, consider renaming it to `a`
    |
 LL |         macro_rules! a {
    |                      ~
@@ -21,7 +21,7 @@ LL |         macro_rules! _a {
 LL |     env!(a!());
    |          ^
    |
-help: a macro with a similar name exists, consider renaming `_a` into `a`
+help: the leading underscore in `_a` marks it as unused, consider renaming it to `a`
    |
 LL |         macro_rules! a {
    |                      ~
diff --git a/tests/ui/suggestions/silenced-binding-typo.stderr b/tests/ui/suggestions/silenced-binding-typo.stderr
index c362d00c713..a1e8b9e30d4 100644
--- a/tests/ui/suggestions/silenced-binding-typo.stderr
+++ b/tests/ui/suggestions/silenced-binding-typo.stderr
@@ -1,10 +1,12 @@
 error[E0425]: cannot find value `x` in this scope
   --> $DIR/silenced-binding-typo.rs:4:14
    |
+LL |     let _x = 42;
+   |         -- `_x` defined here
 LL |     let _y = x;
    |              ^
    |
-help: a local variable with a similar name exists, consider renaming `_x` into `x`
+help: the leading underscore in `_x` marks it as unused, consider renaming it to `x`
    |
 LL |     let x = 42;
    |         ~