about summary refs log tree commit diff
path: root/tests/rustdoc-ui/coverage/enum-tuple-documented.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-20 21:32:33 +0100
committerGitHub <noreply@github.com>2024-12-20 21:32:33 +0100
commit0b1834d66bcfb038f817e5450aeab5873b809ea5 (patch)
tree4cf168aa11916e812d331fa7a1324f51c26ed02e /tests/rustdoc-ui/coverage/enum-tuple-documented.rs
parent04c804eb465f89895839cdf0f6834d33f79fc8b3 (diff)
parent159dba89efa23c36eca92f1b63176314c357d2a4 (diff)
downloadrust-0b1834d66bcfb038f817e5450aeab5873b809ea5.tar.gz
rust-0b1834d66bcfb038f817e5450aeab5873b809ea5.zip
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`
Diffstat (limited to 'tests/rustdoc-ui/coverage/enum-tuple-documented.rs')
0 files changed, 0 insertions, 0 deletions