summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-02-08 07:13:26 +0100
committerGitHub <noreply@github.com>2023-02-08 07:13:26 +0100
commitfabefe3f313f3aec7f2172ced923d1fa9708d0b2 (patch)
tree0c50e323b94f3afd30f3f38784f0e2f2d3c8fa6c /compiler/rustc_const_eval/src/interpret
parentb16a321b25d436daa43397df39f1d5065f0fb15f (diff)
parent2b70cbb8a5935a8fbc8d52d7e8304f8eefeb2d21 (diff)
downloadrust-fabefe3f313f3aec7f2172ced923d1fa9708d0b2.tar.gz
rust-fabefe3f313f3aec7f2172ced923d1fa9708d0b2.zip
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
Rename `PointerSized` to `PointerLike`

The old name was unnecessarily vague. This PR renames a nightly language feature that I added, so I don't think it needs any additional approval, though anyone can feel free to speak up if you dislike the rename.

It's still unsatisfying that we don't the user which of {size, alignment} is wrong, but this trait really is just a stepping stone for a more generalized mechanism to create `dyn*`, just meant for nightly testing, so I don't think it really deserves additional diagnostic machinery for now.

Fixes #107696, cc ``@RalfJung``
r? ``@eholk``
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/cast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/cast.rs b/compiler/rustc_const_eval/src/interpret/cast.rs
index b2c847d3fd8..fc8e0c67ae0 100644
--- a/compiler/rustc_const_eval/src/interpret/cast.rs
+++ b/compiler/rustc_const_eval/src/interpret/cast.rs
@@ -126,7 +126,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                     let vtable = self.get_vtable_ptr(src.layout.ty, data.principal())?;
                     let vtable = Scalar::from_maybe_pointer(vtable, self);
                     let data = self.read_immediate(src)?.to_scalar();
-                    let _assert_pointer_sized = data.to_pointer(self)?;
+                    let _assert_pointer_like = data.to_pointer(self)?;
                     let val = Immediate::ScalarPair(data, vtable);
                     self.write_immediate(val, dest)?;
                 } else {