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``
This commit is contained in:
commit
fabefe3f31
20 changed files with 73 additions and 70 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue