rust/tests
Matthias Krüger 0b1834d66b
Rollup merge of #134573 - lukas-code:unimpl-dyn-pointerlike, r=compiler-errors
unimplement `PointerLike` for trait objects

Values of type `dyn* PointerLike` or `dyn PointerLike` are not pointer-like so these types should not implement `PointerLike`.

After https://github.com/rust-lang/rust/pull/133226, `PointerLike` allows user implementations, so we can't just mark it with `#[rustc_deny_explicit_impl(implement_via_object = false)]`. Instead, this PR splits the `#[rustc_deny_explicit_impl(implement_via_object = ...)]` attribute into two separate attributes `#[rustc_deny_explicit_impl]` and `#[rustc_do_not_implement_via_object]` so that we opt out of the automatic `impl PointerLike for dyn PointerLike` and still allow user implementations.

For traits that are marked with `#[do_not_implement_via_object]` but not `#[rustc_deny_explicit_impl]` I've also made it possible to add a manual `impl Trait for dyn Trait`. There is no immediate need for this, but it was one line to implement and seems nice to have.

fixes https://github.com/rust-lang/rust/issues/134545
fixes https://github.com/rust-lang/rust/issues/134543

r? `@compiler-errors`
2024-12-20 21:32:33 +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 tests/codegen/asm: Remove uses of rustc_attrs and lang_items features by using minicore 2024-12-20 23:19:12 +09: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 Rollup merge of #134506 - oli-obk:push-mrrulszyuslt, r=jieyouxu 2024-12-19 15:26:26 +01: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 #134516 - matthiaskrgr:rollup-aqwxii0, r=matthiaskrgr 2024-12-19 22:38:49 +00:00
pretty Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
run-make Use field init shorthand where possible 2024-12-17 14:33:10 -08: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 Rollup merge of #134481 - estebank:unstable-lint-span, r=compiler-errors 2024-12-18 21:38:11 -05:00
ui Rollup merge of #134573 - lukas-code:unimpl-dyn-pointerlike, r=compiler-errors 2024-12-20 21:32:33 +01:00
ui-fulldeps Fix tests 2024-12-14 14:53:59 +00:00
COMPILER_TESTS.md