| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
This is shorter, avoids potential conflicts with a crate
named `implementors`[^1], and will be less confusing when JS
include files are added for type aliases.
[^1]: AFAIK, this couldn't actually cause any problems right now,
but it's simpler just to make it impossible than relying on never
having a file named `trait.Foo.js` in the crate data area.
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: hide `#[repr(transparent)]` if it isn't part of the public ABI
Fixes #90435.
This hides `#[repr(transparent)]` when the non-1-ZST field the struct is "transparent" over is private.
CC `@RalfJung`
Tentatively nominating it for the release notes, feel free to remove the nomination.
`@rustbot` label needs-fcp relnotes A-rustdoc-ui
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lifetimes
|
|
|
|
r=GuillaumeGomez
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
|
|
|
|
|
|
rustdoc: render generic params & where-clauses of cross-crate assoc tys in impls
We used to only ever render generic parameters & where-clauses of cross-crate associated types when the item was located inside of a trait and we used to just drop them when it was inside of an impl block (trait or inherent).
Fixes #112904.
`@rustbot` label A-cross-crate-reexports
|
|
|
|
blocks
|
|
|
|
|
|
|
|
rustdoc: simplify DOM for `.item-table`
This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
|
|
This switches from using `<div>` to the more semantic `<ul>`, and
using class names that rhyme with the classes the search results
table uses.
|
|
Since these elements now use `white-space: pre-wrap` since
784665d4ce59c5239791f1f96fa2137e47ca1817, it's fine to use newlines
for formatting, which is smaller and a bit less complicated.
|
|
Fixes #93393
|
|
|
|
Stopped being used in CSS with
73d0f7c7b68784f1db0a1f53855c20d118a7e8b0
|
|
|
|
rustdoc: Fix glob import inlining
Filter away names that are not actually imported by the glob, e.g. because they are shadowed by something else.
Fixes the issue found in https://github.com/rust-lang/rust/pull/94857#issuecomment-1382912356.
|
|
Filter away names that are not actually imported by the glob, e.g. because they are shadowed by something else
|
|
This class originated in the very first commit of `rustdoc_ng`, and was used
to add a color border around the item decl based on its kind.
https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106
The item decl no longer has a border, and there aren't any
kind-specific styles in modern rustdoc's rendering of this UI item.
Most of this commit is updating test cases so that they use `item-decl` to
find the `<pre>` tag instead of relying on the fact that the class name
had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
|
|
|