diff options
| author | b-naber <bn263@gmx.de> | 2022-04-12 16:08:59 +0200 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2022-04-12 16:08:59 +0200 |
| commit | 4b126b805bd51d2b7aa335cadd571a319ec0e224 (patch) | |
| tree | 4cbed16eb1722a54e37cc158389801129ae2ef87 /compiler/rustc_const_eval/src/interpret | |
| parent | 8a5273bc995d5ac457eaf70bf3d10c1513277234 (diff) | |
use len on mplace instead of reading immediate, remove dead code
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operand.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/place.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index d820bd900a0..9000567558b 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -248,7 +248,7 @@ impl<'tcx, Tag: Provenance> ImmTy<'tcx, Tag> { impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { /// Try reading an immediate in memory; this is interesting particularly for `ScalarPair`. /// Returns `None` if the layout does not permit loading this as a value. - pub(crate) fn try_read_immediate_from_mplace( + fn try_read_immediate_from_mplace( &self, mplace: &MPlaceTy<'tcx, M::PointerTag>, ) -> InterpResult<'tcx, Option<ImmTy<'tcx, M::PointerTag>>> { diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs index b1784b12c65..85f3f3d53d6 100644 --- a/compiler/rustc_const_eval/src/interpret/place.rs +++ b/compiler/rustc_const_eval/src/interpret/place.rs @@ -191,7 +191,7 @@ impl<'tcx, Tag: Provenance> MPlaceTy<'tcx, Tag> { } #[inline] - pub(super) fn len(&self, cx: &impl HasDataLayout) -> InterpResult<'tcx, u64> { + pub(crate) fn len(&self, cx: &impl HasDataLayout) -> InterpResult<'tcx, u64> { if self.layout.is_unsized() { // We need to consult `meta` metadata match self.layout.ty.kind() { |
