about summary refs log tree commit diff
path: root/tests/ui/suggestions/silenced-binding-typo.fixed
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-10-19 22:34:45 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-10-20 15:58:25 +0000
commitb0d17f35d98c5cafd43a673c70f8ab5d393c31a3 (patch)
tree42f3f639de8a8ba1b2b07397095a475264be1bdf /tests/ui/suggestions/silenced-binding-typo.fixed
parentcc705b801236d064260bb67b3a0a25e4747fa7ec (diff)
downloadrust-b0d17f35d98c5cafd43a673c70f8ab5d393c31a3.tar.gz
rust-b0d17f35d98c5cafd43a673c70f8ab5d393c31a3.zip
Typo suggestion to change bindings with leading underscore
When encountering a binding that isn't found but has a typo suggestion
for a binding with a leading underscore, suggest changing the binding
definition instead of the use place.

Fix #60164.
Diffstat (limited to 'tests/ui/suggestions/silenced-binding-typo.fixed')
-rw-r--r--tests/ui/suggestions/silenced-binding-typo.fixed5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/suggestions/silenced-binding-typo.fixed b/tests/ui/suggestions/silenced-binding-typo.fixed
new file mode 100644
index 00000000000..e0f9e31bef3
--- /dev/null
+++ b/tests/ui/suggestions/silenced-binding-typo.fixed
@@ -0,0 +1,5 @@
+// run-rustfix
+fn main() {
+    let x = 42; //~ HELP
+    let _y = x; //~ ERROR
+}