Make resolve suggestion more generic

This commit is contained in:
Esteban Küber 2022-12-27 12:16:25 -08:00
parent 0c0685bb68
commit 7e84273b7f
2 changed files with 2 additions and 2 deletions

View File

@ -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,
))

View File

@ -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)