Make resolve suggestion more generic
This commit is contained in:
parent
0c0685bb68
commit
7e84273b7f
@ -3354,7 +3354,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
|||||||
}
|
}
|
||||||
Some((
|
Some((
|
||||||
span,
|
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(),
|
sugg.to_string(),
|
||||||
Applicability::MaybeIncorrect,
|
Applicability::MaybeIncorrect,
|
||||||
))
|
))
|
||||||
|
@ -4,7 +4,7 @@ error[E0425]: cannot find function `foo` in this scope
|
|||||||
LL | self.option..foo().get(0)
|
LL | self.option..foo().get(0)
|
||||||
| ^^^ not found in this scope
|
| ^^^ 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)
|
||||||
LL + self.option.foo().get(0)
|
LL + self.option.foo().get(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user