diagnostics: do not suggest map.iter_mut()()
This commit is contained in:
parent
2d37f38f87
commit
a063b3a4b6
@ -787,7 +787,12 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
|||||||
_,
|
_,
|
||||||
[
|
[
|
||||||
Expr {
|
Expr {
|
||||||
kind: MethodCall(path_segment, ..),
|
kind:
|
||||||
|
MethodCall(
|
||||||
|
path_segment,
|
||||||
|
_args,
|
||||||
|
span,
|
||||||
|
),
|
||||||
hir_id,
|
hir_id,
|
||||||
..
|
..
|
||||||
},
|
},
|
||||||
@ -831,7 +836,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
|||||||
if let Some(mut suggestions) = opt_suggestions {
|
if let Some(mut suggestions) = opt_suggestions {
|
||||||
if suggestions.peek().is_some() {
|
if suggestions.peek().is_some() {
|
||||||
err.span_suggestions(
|
err.span_suggestions(
|
||||||
path_segment.ident.span,
|
*span,
|
||||||
"use mutable method",
|
"use mutable method",
|
||||||
suggestions,
|
suggestions,
|
||||||
Applicability::MaybeIncorrect,
|
Applicability::MaybeIncorrect,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user