| Age | Commit message (Collapse) | Author | Lines |
|
This fixes a couple of bugs visible on https://doc.rust-lang.org/nightly/std/marker/trait.Sync.html . For example:
* `impl<T> Sync for *const T` should read `impl<T> !Sync for *const T`
* `impl<T> !Sync for Weak<T>` should read `impl<T> !Sync for Weak<T> where T: ?Sized`
This does change a struct in librustdoc and it seems that almost everything there is marked public, so if librustdoc has stability guarantees that could be a problem. If it is, I'll find a way to rework the change to avoid modifying public structures.
|
|
|
|
|
|
|
|
|
|
rustdoc: Associated type fixes
The first commit fixes a bug with "dud" items in the search index from
misrepresented `type` items in trait impl blocks.
For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.
There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).
Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.
The second commit fixes a bug that made signatures and where bounds
using associated types (if they were not on `Self`) incorrect.
The third commit fixes so that where clauses in type alias definititons
are shown.
Fixes #22442
Fixes #24417
Fixes #25769
|
|
Yes, it's allowed. Example:
type MapFn<I, B> where I: Iterator = Map<I, fn(I::Item) -> B>;
Fixes #25769
|
|
Functions such as `fn foo<I: Iterator>(x: I::Item)` would not
render correctly and displayed `I` instead of `I::Item`. Same thing
with `I::Item` appearing in where bounds.
This fixes the bug by using paths for generics.
Fixes #24417
|
|
Fixes #24575
|
|
For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.
There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).
Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.
Fixes #22442
|
|
Section only visible if there are assoc. consts. present.
|
|
Associated constants were now showing up for traits and would panic if they were
found on an inherent impl. This commit unblocks the nighly builders.
|
|
The problem is that rustdoc searches for external crates using the host
triple, not the target triple. It's actually unclear to me whether this is
correct behavior or not, but it is necessary to get cross-compiled tests
working.
|
|
Whenever a type implements Deref, rustdoc will now add a section to the "methods
available" sections for "Methods from Deref<Target=Foo>", listing all the
inherent methods of the type `Foo`.
Closes #19190
|
|
|
|
Closes #23744
|
|
The set of types which can have an inherent impl changed slightly and rustdoc
just needed to catch up to understand what it means to see a `impl str`!
Closes #23511
|
|
This ends up causing duplicate output in rustdoc. The source of these duplicates
is that the item is defined in both resolve namespaces, so it's listed twice.
Closes #23207
|
|
Strip them from output like other `# `-starting lines.
Closes #23106
|
|
This commit ensures that the ABI of functions is propagated all the way through
to the documentation.
Closes #22038
|
|
This change is aimed at improving cross-crate (inlined) notation of generic
closures. The change modifies `simplify::where_predicates` to handle
parenthesized notation as well as starting to handle supertrait bounds as well.
This was necessary because all output constraints of closures are bound to
`FnOnce` but most trait bounds are that of `FnMut`.
Close #21801
|
|
Closes #23864
|
|
Closes #21474
|
|
Close #21092
|
|
* All bounds are now discovered through the trait to be inlined.
* The `?Sized` bound now renders correctly for inlined associated types.
* All `QPath`s (`<A as B>::C`) instances are rendered as `A::C` where `C` is a
hyperlink to the trait `B`. This should improve at least how the docs look at
least.
* Supertrait bounds are now separated and display as the source lists them.
Closes #20727
Closes #21145
|
|
Add a custom module to rustdoc which simplifies the output of `middle::ty` into
a more readable form which tends to be written down anyway!
Closes #20646
|
|
It's somewhat common to impl traits for `&T` and `&mut T` so show these on the
pages for `T` to ensure they're listed somewhere at least.
Closes #20175
|
|
This renders a "Methods" and "Trait Implementations" section for each item
implemented for a bare trait itself.
Closes #19055
|
|
This adds support in rustdoc to blanket apply crate attributes to all doc tests
for a crate at once. The syntax for doing this is:
#![doc(test(attr(...)))]
Each meta item in `...` will be applied to each doctest as a crate attribute.
cc #18199
|
|
All methods listed in "Trait Implementations" now hyperlink to the source trait
instead of themselves, allowing easy browsing of the documentation of a trait
method.
Closes #17476
|
|
If an empty public module has no documentation, it shouldn't emit a page that's
just a redirect loop to itself!
Closes #16265
|
|
Closes #16019
|
|
Closes #15347
|
|
Closes #15318
|
|
|
|
This ensures that all external traits are run through the same filters that the
rest of the AST goes through, stripping hidden function as necessary.
Closes #13698
|
|
|