mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and `SyncUnsafeCell`. * Implementing `PointerLike` for `UnsafeCell` enables the possibility of interior mutable `dyn*` values. Since this means potentially exercising new codegen behavior, I added a test for it in `tests/ui/dyn-star/cell.rs`. Please let me know if there are further sorts of tests that should be written, or other care that should be taken with this change. It is unfortunately not possible without compiler changes to implement `PointerLike` for `Atomic*` types, since they are not `repr(transparent)` (and, in theory if not in practice, `AtomicUsize`'s alignment may be greater than that of an ordinary pointer or `usize`). * Implementing `PointerLike` for `NonNull` is useful for pointer types which wrap `NonNull`. * Implementing `PointerLike` for `isize` is just for completeness; I have no use cases in mind, but I cannot think of any reason not to do this. * Tracking issue: #102425 `@rustbot` label +F-dyn_star (there is no label or tracking issue for F-pointer_like_trait) |
||
---|---|---|
.. | ||
auxiliary | ||
align.normal.stderr | ||
align.over_aligned.stderr | ||
align.rs | ||
async-block-dyn-star.rs | ||
async-block-dyn-star.stderr | ||
box.rs | ||
cell.rs | ||
check-size-at-cast-polymorphic-bad.current.stderr | ||
check-size-at-cast-polymorphic-bad.next.stderr | ||
check-size-at-cast-polymorphic-bad.rs | ||
check-size-at-cast-polymorphic.rs | ||
check-size-at-cast.rs | ||
check-size-at-cast.stderr | ||
const-and-static.rs | ||
const-and-static.stderr | ||
const.rs | ||
dispatch-on-pin-mut.rs | ||
dispatch-on-pin-mut.run.stdout | ||
dispatch-on-pin-mut.stderr | ||
dont-unsize-coerce-dyn-star.rs | ||
dont-unsize-coerce-dyn-star.run.stdout | ||
dont-unsize-coerce-dyn-star.stderr | ||
drop.rs | ||
drop.run.stdout | ||
dyn-async-trait.rs | ||
dyn-pointer-like.rs | ||
dyn-pointer-like.stderr | ||
dyn-star-to-dyn.rs | ||
dyn-star-to-dyn.stderr | ||
dyn-to-rigid.rs | ||
dyn-to-rigid.stderr | ||
enum-cast.rs | ||
error.rs | ||
error.stderr | ||
feature-gate-dyn_star.rs | ||
feature-gate-dyn_star.stderr | ||
float-as-dyn-star.rs | ||
float-as-dyn-star.stderr | ||
gated-span.rs | ||
gated-span.stderr | ||
illegal.rs | ||
illegal.stderr | ||
issue-102430.rs | ||
make-dyn-star.rs | ||
method.rs | ||
no-explicit-dyn-star-cast.rs | ||
no-explicit-dyn-star-cast.stderr | ||
no-explicit-dyn-star.rs | ||
no-explicit-dyn-star.stderr | ||
no-implicit-dyn-star.rs | ||
no-implicit-dyn-star.stderr | ||
no-unsize-coerce-dyn-trait.rs | ||
no-unsize-coerce-dyn-trait.stderr | ||
param-env-region-infer.current.stderr | ||
param-env-region-infer.rs | ||
pointer-like-impl-rules.rs | ||
pointer-like-impl-rules.stderr | ||
return.rs | ||
return.stderr | ||
syntax.rs | ||
thin.next.stderr | ||
thin.old.stderr | ||
thin.rs | ||
union.rs | ||
union.stderr | ||
unsize-into-ref-dyn-star.rs | ||
unsize-into-ref-dyn-star.stderr | ||
upcast.rs | ||
upcast.stderr |