diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-04-16 12:03:39 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-04-16 12:05:54 +0200 |
| commit | 2109fe4e4e3cd8b81a4f91fab8be9a30f2eee8bc (patch) | |
| tree | 8429d0a691d50b27118f2976de1f9b036bfae834 /compiler/rustc_mir_transform/src | |
| parent | e6e956dade79bdc084dfe3078abab24656a1b483 (diff) | |
| download | rust-2109fe4e4e3cd8b81a4f91fab8be9a30f2eee8bc.tar.gz rust-2109fe4e4e3cd8b81a4f91fab8be9a30f2eee8bc.zip | |
Move some utils out of `rustc_const_eval`
This allows us to get rid of the `rustc_const_eval->rustc_borrowck` dependency edge which was delaying the compilation of borrowck. The added utils in `rustc_middle` are small and should not affect compile times there.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/check_const_item_mutation.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/check_const_item_mutation.rs b/compiler/rustc_mir_transform/src/check_const_item_mutation.rs index 3d32c586554..57b24c9c552 100644 --- a/compiler/rustc_mir_transform/src/check_const_item_mutation.rs +++ b/compiler/rustc_mir_transform/src/check_const_item_mutation.rs @@ -134,7 +134,12 @@ impl<'tcx> Visitor<'tcx> for ConstMutationChecker<'_, 'tcx> { // the `self` parameter of a method call (as the terminator of our current // BasicBlock). If so, we emit a more specific lint. let method_did = self.target_local.and_then(|target_local| { - crate::util::find_self_call(self.tcx, &self.body, target_local, loc.block) + rustc_middle::util::find_self_call( + self.tcx, + &self.body, + target_local, + loc.block, + ) }); let lint_loc = if method_did.is_some() { self.body.terminator_loc(loc.block) } else { loc }; |
