about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-12-27 12:16:25 -0800
committerEsteban Küber <esteban@kuber.com.ar>2022-12-27 12:16:25 -0800
commit7e84273b7fcaa0f6578c97fd71e27453ef300c31 (patch)
tree2375bd845d94ca7a885c8f16dddf26d94a234bd2
parent0c0685bb68a53636e1347ea93dccfa7ac1e24deb (diff)
downloadrust-7e84273b7fcaa0f6578c97fd71e27453ef300c31.tar.gz
rust-7e84273b7fcaa0f6578c97fd71e27453ef300c31.zip
Make resolve suggestion more generic
-rw-r--r--compiler/rustc_resolve/src/late.rs2
-rw-r--r--src/test/ui/suggestions/method-access-to-range-literal-typo.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index 7720d87c04b..49e069f58c9 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -3354,7 +3354,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
                     }
                     Some((
                         span,
-                        "you might have meant to write a method call instead of a range",
+                        "you might have meant to write `.` instead of `..`",
                         sugg.to_string(),
                         Applicability::MaybeIncorrect,
                     ))
diff --git a/src/test/ui/suggestions/method-access-to-range-literal-typo.stderr b/src/test/ui/suggestions/method-access-to-range-literal-typo.stderr
index 02db7f81ebd..c84f9467891 100644
--- a/src/test/ui/suggestions/method-access-to-range-literal-typo.stderr
+++ b/src/test/ui/suggestions/method-access-to-range-literal-typo.stderr
@@ -4,7 +4,7 @@ error[E0425]: cannot find function `foo` in this scope
 LL |         self.option..foo().get(0)
    |                      ^^^ not found in this scope
    |
-help: you might have meant to write a method call instead of a range
+help: you might have meant to write `.` instead of `..`
    |
 LL -         self.option..foo().get(0)
 LL +         self.option.foo().get(0)