mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() rustdoc: fix cross-crate `impl Sized` & `impl ?Sized` Previously, cross-crate impl-Trait (APIT, RPIT, etc.) that only consists of a single `Sized` bound (modulo outlives-bounds) and ones that are `?Sized` were incorrectly rendered. To give you a taste (before vs. after): ```diff - fn sized(x: impl ) -> impl + fn sized(x: impl Sized) -> impl Sized - fn sized_outlives<'a>(x: impl 'a) -> impl 'a + fn sized_outlives<'a>(x: impl Sized + 'a) -> impl Sized + 'a - fn maybe_sized(x: &impl ) -> &impl + fn maybe_sized(x: &impl ?Sized) -> &impl ?Sized - fn debug_maybe_sized(x: &impl Debug) -> &impl ?Sized + Debug + fn debug_maybe_sized(x: &(impl Debug + ?Sized)) -> &(impl Debug + ?Sized) ``` Moreover, we now surround impl-Trait that has multiple bounds with parentheses if they're the pointee of a reference or raw pointer type. This affects both local and cross-crate docs. The current output isn't correct (rustc would emit the error *ambiguous `+` in a type* if we fed the rendered code back to it). --- Best reviewed commit by commit :) `@rustbot` label A-cross-crate-reexports |
||
---|---|---|
.. | ||
auxiliary | ||
add-docs.rs | ||
assoc_item_trait_bounds.out0.html | ||
assoc_item_trait_bounds.out2.html | ||
assoc_item_trait_bounds.out9.html | ||
assoc_item_trait_bounds.rs | ||
assoc-const-equality.rs | ||
assoc-items.rs | ||
cross-glob.rs | ||
default-trait-method.rs | ||
dyn_trait.rs | ||
hidden-use.rs | ||
impl_trait.rs | ||
impl-inline-without-trait.rs | ||
impl-sized.rs | ||
implementors-js.rs | ||
inline_hidden.rs | ||
issue-24183.method_no_where_self_sized.html | ||
issue-24183.rs | ||
issue-28480.rs | ||
issue-31948-1.rs | ||
issue-31948-2.rs | ||
issue-31948.rs | ||
issue-32881.rs | ||
issue-33113.rs | ||
macro-vis.rs | ||
macros.rs | ||
proc_macro.rs | ||
renamed-via-module.rs | ||
repr.rs | ||
ret-pos-impl-trait-in-trait.rs | ||
trait-vis.rs | ||
use_crate.rs |