diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-01-31 12:28:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-31 12:28:20 +0100 |
| commit | 95f746d2ef188fa4e68ca3bfbe03332a1fa802a0 (patch) | |
| tree | 6dd38dca2fb51ac71c54f3b03c975513db19d6e0 /compiler/rustc_borrowck/src | |
| parent | 417aa6c1f60098d3b5d102aeb3bfa246259b7b35 (diff) | |
| parent | 0c470910061c9ad379b1cbf8a74315bc1a9b3c74 (diff) | |
| download | rust-95f746d2ef188fa4e68ca3bfbe03332a1fa802a0.tar.gz rust-95f746d2ef188fa4e68ca3bfbe03332a1fa802a0.zip | |
Rollup merge of #136336 - nnethercote:overhaul-rustc_middle-util, r=jieyouxu
Overhaul `rustc_middle::util` It's an odd module with some odd stuff in it. r? `@Noratrieb`
Diffstat (limited to 'compiler/rustc_borrowck/src')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mod.rs | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index 07dcbba019a..0118b72962d 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -3777,7 +3777,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> { let tcx = self.infcx.tcx; if let Some(Terminator { kind: TerminatorKind::Call { call_source, fn_span, .. }, .. }) = &self.body[loan.reserve_location.block].terminator - && let Some((method_did, method_args)) = rustc_middle::util::find_self_call( + && let Some((method_did, method_args)) = mir::find_self_call( tcx, self.body, loan.assigned_place.local, diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index bd6f77156ca..5fe8eef3460 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -17,7 +17,7 @@ use rustc_middle::mir::tcx::PlaceTy; use rustc_middle::mir::{ AggregateKind, CallSource, ConstOperand, ConstraintCategory, FakeReadCause, Local, LocalInfo, LocalKind, Location, Operand, Place, PlaceRef, ProjectionElem, Rvalue, Statement, - StatementKind, Terminator, TerminatorKind, + StatementKind, Terminator, TerminatorKind, find_self_call, }; use rustc_middle::ty::print::Print; use rustc_middle::ty::{self, Ty, TyCtxt}; @@ -1016,12 +1016,9 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> { kind: TerminatorKind::Call { fn_span, call_source, .. }, .. }) = &self.body[location.block].terminator { - let Some((method_did, method_args)) = rustc_middle::util::find_self_call( - self.infcx.tcx, - self.body, - target_temp, - location.block, - ) else { + let Some((method_did, method_args)) = + find_self_call(self.infcx.tcx, self.body, target_temp, location.block) + else { return normal_ret; }; |
