| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Preserve whitespace inside one-backtick codeblocks
Previously this was only done inside short docblocks (e.g., summary
lines), but we should also do so in general.
Fixes #65555
|
|
rustdoc: Don't panic when failing to write .lock file
It can be treated like any other unexpected IO error.
I couldn't think of a good way to add a test for this unfortunately.
r? @GuillaumeGomez
|
|
It can be treated like any other unexpected IO error.
|
|
Move process_configure_mod to rustc_parse
This removes the hack in favor of perhaps a less principled, but less painful, approach.
This also supports my work to decouple `Session` from librustc, as `ParseSess` currently has `Attribute` as "part" of it but after this PR will no longer do so.
|
|
This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
|
|
The previous commit removes the use of this, and now we cleanup.
|
|
Fix selected crate search filter
Fixes #62929.
r? @kinnison
|
|
rustdoc: fixes #64305: disable search field instead of hidding it
The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all.
@GuillaumeGomez
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
r=GuillaumeGomez
Update Source Code Pro and include italics
Fixes #65502.
A few notes:
* As stated in #65502, this does increase the download size.
* Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged.
* The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files ([Source Code Pro otf renders poorly on older Windows system apps](https://github.com/adobe-fonts/source-code-pro/issues/25#issuecomment-9019600)).
|
|
|
|
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
r=GuillaumeGomez
[doc] Fix the source code highlighting on source comments
The code would always forget the previous selection.
r? @GuillaumeGomez
|
|
r=ollie27,Dylan-DPC
Stabilize rustdoc theme options
Closes #54730
This PR stabilizes the `--themes` (now `--theme`) and `--theme-checker` (now `--check-theme`) options, for allowing users to add custom themes to their documentation.
Rustdoc includes two themes by default: `light` and `dark`. Using the `--theme` option, you can give rustdoc a CSS file to include as an extra theme for that render. Themes are named after the CSS file used, so using `--theme /path/to/your/custom-theme.css` will add a theme called `custom-theme` to the documentation.
Even though the CLI flag to add a theme is getting stabilized, there's no guarantee that a theme file will always have the same effect on documentation generated with future versions of rustdoc. To aid in ensuring that a theme will work, the flag `--check-theme` is also available, which compares the CSS rules defined by a custom theme against the ones used in the `light` theme. If the `light` theme defines a CSS rule that the custom theme does not, rustdoc will report an error. (Rustdoc also performs this check for themes given to `--theme`, but only reports a warning when a difference is found.)
|
|
|
|
|
|
|
|
themes file names are js compatible
|
|
|
|
|
|
|
|
rustdoc: Stabilize `edition` annotation.
The rustdoc `edition` annotation is currently ignored on stable. This means that the tests will be ignored, unless there is a `rust` annotation, then it will use the global edition. I suspect this was just an oversight during the edition stabilization, but I don't know. Example:
```rust
/// ```edition2018
/// // This code block was ignored on stable.
/// ```
/// ```rust,edition2018
/// // This code block would use whatever edition is passed on the command line.
/// ```
```
AFAIK, it is not possible to write a test that verifies stable behavior, as all tests appear to set RUSTC_BOOTSTRAP which forces all tests to run as "nightly", even on a stable release.
Closes #65980
|
|
|
|
|
|
Also move the declaration outside the loop since they accumulate state with each iteration
|
|
|
|
also move MACRO_ARGUMENTS -> librustc_parse
|
|
|
|
|
|
No more hidden elements
Fixes #66046.
Follow-up of #66082.
r? @kinnison
|
|
syntax: move stuff around
Part of https://github.com/rust-lang/rust/pull/65324.
r? @davidtwco
cc @estebank @petrochenkov
|
|
[rustdoc] add sub settings
This PR is to give a finer control over what types are automatically expanded or not as well as the possibility to add sub-settings in the settings page.

r? @Mark-Simulacrum
|
|
|
|
|
|
|
|
|
|
r=estebank
Rename `LocalInternedString` and more
This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses.
r? @estebank
|
|
use silent emitter for rustdoc highlighting pass
Partially addresses #63284.
|
|
|
|
|
|
|
|
r=Mark-Simulacrum
Move help popup generation code
The first commit is just a small cleanup.
The idea behind this PR is to reduce a bit more the generated HTML files by moving the duplicated code into one place instead.
r? @kinnison
|
|
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch
of unnecessary sigils.
|
|
Prevent help popup to disappear when clicking on it
Fixes #65736.
r? @kinnison
|
|
|
|
This is done by moving some data definitions to syntax::expand.
|
|
|
|
|
|
|
|
|