Fix typos
This commit is contained in:
parent
0c7f8b0f89
commit
2c433d0e9c
1 changed files with 3 additions and 3 deletions
|
@ -631,7 +631,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: We make sure that this is a normal top-level binding,
|
// FIXME: We make sure that this is a normal top-level binding,
|
||||||
// but we could suggest `todo!()` for all uninitalized bindings in the pattern pattern
|
// but we could suggest `todo!()` for all uninitialized bindings in the pattern pattern
|
||||||
if let hir::StmtKind::Let(hir::LetStmt { span, ty, init: None, pat, .. }) =
|
if let hir::StmtKind::Let(hir::LetStmt { span, ty, init: None, pat, .. }) =
|
||||||
&ex.kind
|
&ex.kind
|
||||||
&& let hir::PatKind::Binding(..) = pat.kind
|
&& let hir::PatKind::Binding(..) = pat.kind
|
||||||
|
@ -759,7 +759,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
/// In a move error that occurs on a call wihtin a loop, we try to identify cases where cloning
|
/// In a move error that occurs on a call within a loop, we try to identify cases where cloning
|
||||||
/// the value would lead to a logic error. We infer these cases by seeing if the moved value is
|
/// the value would lead to a logic error. We infer these cases by seeing if the moved value is
|
||||||
/// part of the logic to break the loop, either through an explicit `break` or if the expression
|
/// part of the logic to break the loop, either through an explicit `break` or if the expression
|
||||||
/// is part of a `while let`.
|
/// is part of a `while let`.
|
||||||
|
@ -960,7 +960,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
||||||
{
|
{
|
||||||
// FIXME: We could check that the call's *parent* takes `&mut val` to make the
|
// FIXME: We could check that the call's *parent* takes `&mut val` to make the
|
||||||
// suggestion more targeted to the `mk_iter(val).next()` case. Maybe do that only to
|
// suggestion more targeted to the `mk_iter(val).next()` case. Maybe do that only to
|
||||||
// check for wheter to suggest `let value` or `let mut value`.
|
// check for whether to suggest `let value` or `let mut value`.
|
||||||
|
|
||||||
let span = in_loop.span;
|
let span = in_loop.span;
|
||||||
if !finder.found_breaks.is_empty()
|
if !finder.found_breaks.is_empty()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue