Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #96301 - notriddle:notriddle/synthetic-impl-prim, r=Gui…
…llaumeGomez rustdoc: make primitive synthetic impls for correct doc module This improves the accuracy of libcore primitive docs, which was missing the blanket and auto impls for most primitive types. To test this, compare nightly [libcore::str] docs, which lack auto traits like Send, with [std::str] docs, which show them. [libcore::str]: https://doc.rust-lang.org/nightly/core/primitive.str.html [libstd::str]: https://doc.rust-lang.org/nightly/std/primitive.str.html It also avoids getting synthetic impls for primitive types on crates that do not actually show them. <details> <summary>Before and After trace logs</summary> ## Before [notriddle@deep-thought test-dingus]$ RUSTDOC_LOG=rustdoc=trace rustdoc +nightly test.rs 2>&1 | grep -E 'get_blanket_impls\(' TRACE rustdoc::clean::blanket_impl get_blanket_impls(Whatever) TRACE rustdoc::clean::blanket_impl get_blanket_impls(isize) TRACE rustdoc::clean::blanket_impl get_blanket_impls([T]) TRACE rustdoc::clean::blanket_impl get_blanket_impls([u8]) TRACE rustdoc::clean::blanket_impl get_blanket_impls([T]) TRACE rustdoc::clean::blanket_impl get_blanket_impls([u8]) TRACE rustdoc::clean::blanket_impl get_blanket_impls(char) TRACE rustdoc::clean::blanket_impl get_blanket_impls(u128) TRACE rustdoc::clean::blanket_impl get_blanket_impls(u16) TRACE rustdoc::clean::blanket_impl get_blanket_impls(i128) TRACE rustdoc::clean::blanket_impl get_blanket_impls(i16) TRACE rustdoc::clean::blanket_impl get_blanket_impls(str) TRACE rustdoc::clean::blanket_impl get_blanket_impls(str) TRACE rustdoc::clean::blanket_impl get_blanket_impls(f64) TRACE rustdoc::clean::blanket_impl get_blanket_impls(f64) TRACE rustdoc::clean::blanket_impl get_blanket_impls(u64) TRACE rustdoc::clean::blanket_impl get_blanket_impls(u8) TRACE rustdoc::clean::blanket_impl get_blanket_impls(i64) TRACE rustdoc::clean::blanket_impl get_blanket_impls(i8) TRACE rustdoc::clean::blanket_impl get_blanket_impls(*const T) TRACE rustdoc::clean::blanket_impl get_blanket_impls(*mut T) TRACE rustdoc::clean::blanket_impl get_blanket_impls(*const [T]) TRACE rustdoc::clean::blanket_impl get_blanket_impls(*mut [T]) TRACE rustdoc::clean::blanket_impl get_blanket_impls([T; N]) TRACE rustdoc::clean::blanket_impl get_blanket_impls(bool) TRACE rustdoc::clean::blanket_impl get_blanket_impls(f32) TRACE rustdoc::clean::blanket_impl get_blanket_impls(f32) TRACE rustdoc::clean::blanket_impl get_blanket_impls(u32) TRACE rustdoc::clean::blanket_impl get_blanket_impls(usize) TRACE rustdoc::clean::blanket_impl get_blanket_impls(i32) ## After [notriddle@deep-thought test-dingus]$ RUSTDOC_LOG=rustdoc=trace rustdoc +dev test.rs 2>&1 | grep -E 'get_blanket_impls\(' TRACE rustdoc::clean::blanket_impl get_blanket_impls(Whatever) </details>
- Loading branch information