| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
As suggested in
https://github.com/rust-lang/rust/pull/112113/files/1862fcb1df05b116443ad3b27028616a180ffadb#r1211200570.
|
|
|
|
|
|
The default fn ret ty is always unit. Just use that.
Looking back at the time when `FnRetTy` (then called
`FunctionRetTy`) was first added to rustdoc, it seems to originally
be there because `-> !` was a special form: the never type didn't
exist back then.
https://github.com/rust-lang/rust/commit/eb01b17b06eb35542bb80ff7456043b0ed5572ba#diff-384affc1b4190940f114f3fcebbf969e7e18657a71ef9001da6b223a036687d9L921-L924
|
|
|
|
|
|
|
|
|
|
rustdoc: migrate item_union to an Askama template
|
|
|
|
|
|
|
|
rustdoc: cleanup some intermediate allocs
First commit self contained, second one use `display_fn` for `extra_info_tags`
|
|
|
|
|
|
|
|
Instead of maintaining parallel buffers for both HTML and non-HTML output,
follow the idiom from the rest of format.rs that f.alternate() == true means
textual output. Also, add an argument to control line wrapping explicitly.
This allows the caller to render once with textual output and no line wrapping,
to decide whether line wrapping should be applied in the final HTML output.
Also, remove some format! and " ".repeat calls, and remove a dependency on
calling `String::replace` to switch from newlines to spaces.
This coincidentally fixes some minor bugs where the old code was undercounting
the number of characters for a declaration in text mode.
|
|
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
|
|
An attempt to reduce the perf regression in
https://github.com/rust-lang/rust/pull/108052#issuecomment-1430631861
|
|
Discussed in
https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515
This commit also changes the tooltips on rustdoc intra-doc links
targeting methods.
|
|
use chars instead of strings where applicable
|
|
|
|
rustdoc: Use more let chain
Got the idea after yesterday's review.
r? `@notriddle`
|
|
|
|
This commit makes intra-doc link tooltips consistent with generated
links in function signatures and item tables, with the format
`itemtype foo::bar::baz`. This way, you can tell if a link points at
a trait or a type (for example) by mousing over it.
See also fce944d4e79b3a87ddf511206724edf33acfd704
|
|
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.
|
|
rustdoc: fix item-spacer
rustdoc: use proper comment style
rustdoc: change formatting where clauses for traits
rustdoc: remove semicolon from provided methods
update provided methods formatting
|
|
Co-Authored-By: David Tolnay <dtolnay@gmail.com>
|
|
This patch avoids hard-to-click single character links by making
the generic part of the link:
Before: <a href="#">&</a>T
After: <a href="#">&T</a>
|
|
|
|
|
|
|
|
Left a todo awhile ago (I think), so fill it in to print a const for `Term`s.
|
|
Fixes #102576
|
|
function pointers
for consistency with the way we display local definitions (cleaned from HIR, not from rustc_middle).
|
|
|
|
rustdoc for external def-ids
|
|
And a couple of other naming tweaks
Related to https://github.com/rust-lang/rust/issues/48054
|
|
|
|
|
|
This is 682889fb06591c4245422b73b005c5d8ae2d0cad, but for arrays instead.
For non-generics, this retains links to the array page, but instead of
trying to link it all, it only links the length part, which distinguishes
arrays from slices.
For generics, the entire thing becomes a link, just like slices.
|
|
|
|
|
|
r=notriddle
Remove unneeded where whitespace
It fixes these two bugs:


It's a relic from a very old time (this commit: https://github.com/rust-lang/rust/commit/bfd01b7f40ae2cbfe9acbc1d10e79ffe16870df8).
You can test the result [here](https://rustdoc.crud.net/imperio/remove-unneeded-where-whitespace/lib2/struct.WhereWhitespace.html).
cc `````````@jsha`````````
r? `````````@notriddle`````````
|
|
|
|
This way it also happens for json output.
Fixes #101199
|
|
This reduces the size of Type.
|