diff options
| author | yukang <moorekang@gmail.com> | 2024-02-11 14:47:30 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2024-02-12 09:51:35 +0800 |
| commit | 2bcbc16caf17351ef3f8d5e9faee98b48387d589 (patch) | |
| tree | 81a82bbc409eaccb924493b2f76b4652d10d4aae /compiler/rustc_const_eval | |
| parent | 42752cbe095b9ad9941f20f22f80788d95f4ab06 (diff) | |
| download | rust-2bcbc16caf17351ef3f8d5e9faee98b48387d589.tar.gz rust-2bcbc16caf17351ef3f8d5e9faee98b48387d589.zip | |
remove a bunch of dead parameters in fn
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/resolver.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/resolver.rs b/compiler/rustc_const_eval/src/transform/check_consts/resolver.rs index a23922c778f..2c835f6750f 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/resolver.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/resolver.rs @@ -96,7 +96,7 @@ where }); } - fn address_of_allows_mutation(&self, _mt: mir::Mutability, _place: mir::Place<'tcx>) -> bool { + fn address_of_allows_mutation(&self) -> bool { // Exact set of permissions granted by AddressOf is undecided. Conservatively assume that // it might allow mutation until resolution of #56604. true @@ -171,10 +171,8 @@ where self.super_rvalue(rvalue, location); match rvalue { - mir::Rvalue::AddressOf(mt, borrowed_place) => { - if !borrowed_place.is_indirect() - && self.address_of_allows_mutation(*mt, *borrowed_place) - { + mir::Rvalue::AddressOf(_mt, borrowed_place) => { + if !borrowed_place.is_indirect() && self.address_of_allows_mutation() { let place_ty = borrowed_place.ty(self.ccx.body, self.ccx.tcx).ty; if Q::in_any_value_of_ty(self.ccx, place_ty) { self.state.qualif.insert(borrowed_place.local); |
