diff options
| author | bors <bors@rust-lang.org> | 2024-09-03 01:27:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-03 01:27:20 +0000 |
| commit | 6199b69c53a8c275ca3cd59647ea0af5ca29aae2 (patch) | |
| tree | 75ddc29eb734ea11a6652ce3f688a3037095bba3 /compiler/rustc_const_eval/src/interpret | |
| parent | 2251572086f12186b5a499bf55dee82145173ed3 (diff) | |
| parent | 88b6a78d0b8b7661db8bea0d0743652bcb9a4600 (diff) | |
Auto merge of #129777 - nnethercote:unreachable_pub-4, r=Urgau
Add `unreachable_pub`, round 4 A follow-up to #129732. r? `@Urgau`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/place.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs index d7d033e5162..840f7986c6e 100644 --- a/compiler/rustc_const_eval/src/interpret/place.rs +++ b/compiler/rustc_const_eval/src/interpret/place.rs @@ -61,13 +61,13 @@ pub(super) struct MemPlace<Prov: Provenance = CtfeProvenance> { impl<Prov: Provenance> MemPlace<Prov> { /// Adjust the provenance of the main pointer (metadata is unaffected). - pub fn map_provenance(self, f: impl FnOnce(Prov) -> Prov) -> Self { + fn map_provenance(self, f: impl FnOnce(Prov) -> Prov) -> Self { MemPlace { ptr: self.ptr.map_provenance(|p| p.map(f)), ..self } } /// Turn a mplace into a (thin or wide) pointer, as a reference, pointing to the same space. #[inline] - pub fn to_ref(self, cx: &impl HasDataLayout) -> Immediate<Prov> { + fn to_ref(self, cx: &impl HasDataLayout) -> Immediate<Prov> { Immediate::new_pointer_with_meta(self.ptr, self.meta, cx) } |
