| Age | Commit message (Collapse) | Author | Lines |
|
|
|
There are many places that join path segments with `::` to produce a
string. A lot of these use `join("::")`. Many in rustdoc use
`join_with_double_colon`, and a few use `.joined("..")`. One in Clippy
uses `itertools::join`. A couple of them look for `kw::PathRoot` in the
first segment, which can be important.
This commit introduces `rustc_ast::join_path_{syms,ident}` to do the
joining for everyone. `rustc_ast` is as good a location for these as
any, being the earliest-running of the several crates with a `Path`
type. Two functions are needed because `Ident` printing is more complex
than simple `Symbol` printing.
The commit also removes `join_with_double_colon`, and
`estimate_item_path_byte_length` with it.
There are still a handful of places that join strings with "::" that are
unchanged. They are not that important: some of them are in tests, and
some of them first split a path around "::" and then rejoin with "::".
This fixes one test case where `{{root}}` shows up in an error message.
|
|
Use `join_with_double_colon` in `write_shared.rs`.
For consistency. Also, it's faster because `join_with_double_colon` does a better job estimating the allocation size than `join` from `itertools`.
r? `@camelid`
|
|
|
|
For consistency. Also, it's faster because `join_with_double_colon` does
a better job estimating the allocation size than `join` from
`itertools`.
|
|
|
|
|
|
|
|
|
|
this is one-time initialization data, it can just
be a function parameter.
we also move the json parsing into createSrcSidebar
to save a few bytes.
|
|
|
|
- `ret` only ever gets at most one entry, so it can be an `Option`
instead of a `Vec`.
- Which means we can use `filter_map` instead of `flat_map`.
- Move `trait_` next to the `ret` assignment, which can only happen
once.
- No need for `impls` to be a `Vec`, it can remain an iterator.
- Avoid `Result` when collecting `impls`.
|
|
|
|
|
|
This is a huge perf win for rustdoc on the `typenum` and `nalgebra`
benchmarks, because the `else` branch doesn't get hit much.
|
|
The comparison against `text` seems to be unnecessary.
|
|
Add rustdoc support for `--emit=dep-info[=path]`
Fixes #91982.
This PR adds the `--emit=dep-info` command line flag support. It will be helpful for `cargo` development.
cc ````@epage````
r? ````@notriddle````
|
|
should emit crate
|
|
|
|
|
|
This way, adding a bunch of comments to the JS files won't make
rustdoc slower.
|
|
this also makes the rust.docs-minification option work
as advertised in config.toml
nothing fancy this time, this is intended to be perma-unstable.
it's only really here for the benefit of rustdoc devs.
mitegates https://github.com/rust-lang/rust/issues/135345
|
|
|
|
|
|
|
|
Rustdoc markdown handling is currently split between:
- html::markdown, which contains all the meaty login
- markdown, which is only used for when rustdoc renders a standalone
markdown file
Adds module-level doc-comment to markdown, and rename the function so
it's clear that it's doing IO (instead of just rendering to a string).
|
|
|
|
|
|
This allows the visitor to borrow from the visitees.
|
|
|
|
|
|
rustdoc rfc#3662 changes under unstable flags
* All new functionality is under unstable options
* Adds `--merge=shared|none|finalize` flags
* Adds `--parts-out-dir=<crate specific directory>` for `--merge=none`
to write cross-crate info file for a single crate
* Adds `--include-parts-dir=<previously specified directory>` for
`--merge=finalize` to write cross-crate info files
* `tests/rustdoc/` tests for the new flags
|
|
|
|
* All new functionality is under unstable options
* Adds `--merge=shared|none|finalize` flags
* Adds `--parts-out-dir=<crate specific directory>` for `--merge=none`
to write cross-crate info file for a single crate
* Adds `--include-parts-dir=<previously specified directory>` for
`--merge=finalize` to write cross-crate info files
* update tests/run-make/rustdoc-default-output/rmake.rs golden
|
|
Use `DeepRejectCtxt` to quickly reject `ParamEnv` candidates
The description is on the [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/.5Basking.20for.20help.5D.20.60DeepRejectCtxt.60.20for.20param.20env.20candidates)
r? `@lcnr`
|
|
|
|
Fixes a regression introduced in #128252.
|
|
typos in comments, remove references to crate-info, Self type in
ordered_json and sorted_template
|
|
|
|
|
|
|
|
|
|
The descriptions are, on almost all crates[^1], the majority
of the size of the search index, even though they aren't really
used for searching. This makes it relatively easy to separate
them into their own files.
This commit also bumps us to ES8. Out of the browsers we support,
all of them support async functions according to caniuse.
https://caniuse.com/async-functions
[^1]:
<https://microsoft.github.io/windows-docs-rs/>, a crate with
44MiB of pure names and no descriptions for them, is an outlier
and should not be counted.
|
|
serialization order
|
|
|
|
`var` declare it in the global scope, and `const` does not.
It needs to be declared in global scope.
|
|
|
|
They're only used for HTML, so it makes more sense for them to live
their.
|
|
|
|
|