diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-04-25 18:26:36 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-04-25 18:26:36 +0000 |
| commit | 64a4cdcfd4db72b7fc9b24521111f4f0edac3531 (patch) | |
| tree | c3d589c3c7664f43b48c861437a88216a9f393c4 /compiler/rustc_borrowck | |
| parent | abdb64d4eaa989ff5ef96099f6e1585472de1622 (diff) | |
| download | rust-64a4cdcfd4db72b7fc9b24521111f4f0edac3531.tar.gz rust-64a4cdcfd4db72b7fc9b24521111f4f0edac3531.zip | |
review comment: rename method
Diffstat (limited to 'compiler/rustc_borrowck')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index b800e8d45d2..da58db57525 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -2120,7 +2120,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { let hir::ExprKind::Index(_, idx1, _) = parent.kind else { return }; let hir::Node::Expr(parent) = tcx.parent_hir_node(index2.hir_id) else { return }; let hir::ExprKind::Index(_, idx2, _) = parent.kind else { return }; - if !idx1.equals(idx2) { + if !idx1.equivalent_for_indexing(idx2) { err.help("use `.split_at_mut(position)` to obtain two mutable non-overlapping sub-slices"); } return; @@ -2146,7 +2146,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { let Some(index2) = self.find_expr(issued_span) else { return }; let hir::Node::Expr(parent) = tcx.parent_hir_node(index2.hir_id) else { return }; let hir::ExprKind::Index(_, idx2, _) = parent.kind else { return }; - if idx1.equals(idx2) { + if idx1.equivalent_for_indexing(idx2) { // `let a = &mut foo[0]` and `let b = &mut foo[0]`? Don't mention `split_at_mut` return; } |
