rust/tests
Matthias Krüger c16f00cff6
Rollup merge of #134642 - kpreid:pointerlike-cell, r=compiler-errors
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)
2024-12-22 21:59:27 +01:00
..
assembly tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore 2024-12-18 02:59:07 +09:00
auxiliary tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore 2024-12-18 02:59:07 +09:00
codegen Auto merge of #131193 - EFanZh:asserts-vec-len, r=the8472 2024-12-22 16:09:16 +00:00
codegen-units Use field init shorthand where possible 2024-12-17 14:33:10 -08:00
coverage Rollup merge of #134497 - Zalathar:spans, r=jieyouxu 2024-12-19 15:26:16 +01:00
coverage-run-rustdoc coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
crashes Don't ICE on illegal dyn* casts 2024-12-21 23:43:52 +00:00
debuginfo Reformat Python code with ruff 2024-12-04 23:03:44 +01:00
incremental Add more info on type/trait mismatches for different crate versions 2024-12-07 18:18:08 +00:00
mir-opt Auto merge of #134326 - scottmcm:slice-drop-shim-ptrmetadata, r=saethlin 2024-12-22 13:28:12 +00:00
pretty Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
run-make Update run-make/rustdoc-default-output test 2024-12-20 22:35:00 +01:00
rustdoc Rollup merge of #134321 - dtolnay:docassocconst, r=fmease 2024-12-20 01:36:47 -05:00
rustdoc-gui Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
rustdoc-js Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez 2024-12-16 20:00:20 +01:00
rustdoc-js-std rustdoc-search: update test with now-shorter function path 2024-12-13 09:08:44 -07:00
rustdoc-json Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
rustdoc-ui Add test to ensure passing --doctest_compilation_args multiple times work 2024-12-20 22:35:00 +01:00
ui Rollup merge of #134642 - kpreid:pointerlike-cell, r=compiler-errors 2024-12-22 21:59:27 +01:00
ui-fulldeps Rollup merge of #134599 - dtolnay:fulldepsparser, r=fmease 2024-12-22 09:12:11 +01:00
COMPILER_TESTS.md