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)