| Age | Commit message (Collapse) | Author | Lines |
|
Save crate filtering on rustdoc
Fixes #62929.
I added a hashmap and a hash encoding for the current crate list in case you have multiple crates handling on a same website (who talked about docs.rs?!). Like that, for each context, you have the filter crate selected.
r? @QuietMisdreavus
|
|
|
|
Cleanup: Consistently use `Param` instead of `Arg` #62426
Fixes #62426
|
|
rustdoc: general cleanup
|
|
|
|
libtest: add --show-output flag to print stdout of successful tests
This pull request adds a new flag `--show-output` for tests to show the output of successful tests. For most formatters this was already supported just not exposed via the CLI (apparently only used by `librustdoc`). I've also added support for this option in the JSON formatter.
This kind of fixes https://github.com/rust-lang/rust/issues/54669 which wants `--format json` to work with `--nocapture`, which is... well, impossible. What this issue really calls for is `--show-output` as implemented here.
|
|
|
|
|
|
This introduces a WithFormatter abstraction that permits one-time
fmt::Display on an arbitrary closure, created via `display_fn`. This
allows us to prevent allocation while still using functions instead of
structs, which are a bit unwieldy to thread arguments through as they
can't easily call each other (and are generally a bit opaque).
The eventual goal here is likely to move us off of the formatting
infrastructure entirely in favor of something more structured, but this
is a good step to move us in that direction as it makes, for example,
passing a context describing current state to the formatting impl much
easier.
|
|
|
|
Previously we stored the entire current path which is a bit expensive
and only ever accessed its length. This stores the length directly.
|
|
The alternate mode merely prints out the passed in text which is largely
useless (as the text can simply be directly printed).
|
|
|
|
We have &mut access, so remove the RefCell borrowing
|
|
This allows us to pass it a `&mut DocContext` which will allow removal
of RefCells, etc. in the following commits. It's also somewhat a unique
Clean impl in that it previously ignored `self` (re-retriveing
hir::Crate), which it no longer needs to do.
|
|
|
|
Support `impl Trait` in inlined documentation
`impl Trait` in argument position was not properly rendered when inlined from other crates. ([a live example on docs.rs](https://docs.rs/libp2p/0.8.1/libp2p/floodsub/struct.Floodsub.html#method.unsubscribe))

↓

|
|
Fix confusion in theme picker functions
To reproduce the bug currently: click on the theme picker button twice (to show it then hide it). Then click anywhere else: the dropdown menu appears again.
The problem was coming from a confusion of what the `hideThemeButtonState` and `showThemeButtonState` were supposed to do. I switched their codes and updated the `switchThemeButtonState` function. It now works as expected.
r? @kinnison
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't special case the `Self` parameter by name
This results in a couple of small diagnostic regressions. They could be avoided by keeping the special case just for diagnostics, but that seems worse.
closes #50125
cc #60869
|
|
Use this to simplify the object safety code a bit.
|
|
|
|
|
|
Remove some unnecessary parameters from functions
|
|
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
|
|
|
|
|
|
|
|
Utilize `?` instead of and_then/map operators
|
|
|
|
These impls prevent ergonomic use of the config (e.g., forcing us to use
RefCell) despite all usecases for these structs only using their Display
impls once.
|
|
|
|
|
|
|
|
This is already a query so we're just needlessly copying the data
around.
|
|
|
|
|
|
This drops the parking_lot dependency; the ReentrantMutex type appeared
to be unused (at least, no compilation failures occurred).
This is technically a possible change in behavior of its users, as
lock() would wait on other threads releasing their guards, but since we
didn't actually remove any threading or such in this code, it appears
that we never used that behavior (the behavior change is only noticeable
if the type previously was used in two threads, in a single thread
ReentrantMutex is useless).
|
|
|
|
tcx.crate_name is the appropriate way to retrieve the crate name.
|
|
|
|
|
|
|