rust/library
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
..
alloc Rollup merge of #126118 - jan-ferdinand:docs_for_vec_set_len, r=the8472 2024-12-20 01:36:45 -05:00
backtrace@230570f2da Try latest backtrace 2024-08-29 12:13:19 -07:00
core Rollup merge of #134573 - lukas-code:unimpl-dyn-pointerlike, r=compiler-errors 2024-12-20 21:32:33 +01:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind Rollup merge of #133622 - mkroening:exception-blog, r=cuviper 2024-12-01 08:15:24 +01:00
portable-simd move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
proc_macro Remove support for specializing ToString outside the standard library 2024-12-13 13:48:19 +00:00
profiler_builtins compiler & tools dependencies: 2024-12-17 17:41:00 +00:00
rtstartup Let InstCombine remove Clone shims inside Clone shims 2024-07-25 15:14:42 -04:00
rustc-std-workspace-alloc
rustc-std-workspace-core update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustc-std-workspace-std
std mri: add track_caller to thread spawning methods for better backtraces 2024-12-20 15:03:51 +01:00
stdarch@e5e00aab0a Bump stdarch to the latest master 2024-11-18 18:52:27 +01:00
sysroot Make profiler_builtins an optional dependency of sysroot, not std 2024-10-17 22:08:36 +11:00
test Update thread spawn hooks. 2024-11-19 18:54:20 +01:00
unwind Rollup merge of #122003 - mati865:gnullvm-build-libunwind, r=petrochenkov 2024-12-12 08:06:58 +01:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock build: Update libc version 2024-12-19 10:08:29 +01:00
Cargo.toml Auto merge of #129063 - the8472:cold-opt-size, r=Amanieu 2024-09-02 00:58:50 +00:00