| Age | Commit message (Collapse) | Author | Lines |
|
Cleanup handling of `crate_name` for doctests
- Remove unnecessary reallocation
- Remove unnecessary messing around with `queries` for the crate name; it's simpler and faster to go through the TyCtxt instead
- Rename `cratename` -> `crate_name` for consistency with the rest of the compiler
|
|
r=CraftSpider
Resolve intra-doc links in summary desc
Before:

After:

|
|
rustdoc: add optional woff2 versions of Source Serif and Source Code
This provides woff2 versions of Source Serif and Source Code similar to how #82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
|
|
|
|
|
|
|
|
This makes it consistent with rustc_session::Options.
|
|
It's much more complicated than just going through the TyCtxt.
|
|
Resolve type aliases to the type they point to in intra-doc links
This feels a bit sketchy, but I think it's better than just rejecting the link.
Helps with #86120, r? ``@jyn514``
|
|
|
|
|
|
Rustdoc: Account for const-unstable functions
Fixes #86464
|
|
Spaces
|
|
|
|
|
|
|
|
Use Tera templates for rustdoc.
Replaces a format!() call in layout::render with a template
expansion. Introduces a `templates` field in SharedContext so parts
of rustdoc can share pre-rendered templates.
This currently builds in a copy of the single template available, like
with static files. However, future work can make this live-loadable with
a perma-unstable flag, to make rustdoc developers' work easier.
Part of #84419.
Demo at https://hoffman-andrews.com/rust/tera/std/string/struct.String.html.
|
|
|
|
|
|
Replaces a format!() call in layout::render with a template
expansion. Introduces a `templates` field in SharedContext so parts
of rustdoc can share pre-rendered templates.
This currently builds in a copy of the single template available, like
with static files. However, future work can make this live-loadable with
a perma-unstable flag, to make rustdoc developers' work easier.
|
|
|
|
objects
|
|
matteo-briani:fix-rustdoc-stabilized-versions-layout, r=GuillaumeGomez
Fix rustdoc stabilized versions layout
Fixes #86342
r? `@GuillaumeGomez`
|
|
|
|
Before:

After:

|
|
|
|
|
|
|
|
r=jyn514
fix rustdoc stack overflow on mutually recursive Deref
fix #85095
fix #85037
|
|
|
|
|
|
|
|
These were previously removed along with the details in the
"Implementors" section of trait pages. But for "Implementations on
Foreign Types," we need to include the details because they will not be
documented anywhere else.
|
|
Also factor out outer_version and const_outer_version into
render_rightside.
|
|
|
|
This covers rendering of stability_since and the srclink across methods
and trait implementations, so their DOM representation is consistent.
|
|
That means it will be visible under "Implementors" on trait pages, and
under "Implementations" on struct/enum pages, even when all methods are
collapsed.
Switch to a float layout for rightside elements.
|
|
|
|
These were hidden by default, and duplicated information already on the
page anyhow.
Also remove the "Auto-hide trait implementors of a trait" setting,
which is not needed anymore.
|
|
Add missing backslashes to prevent unwanted newlines in rustdoc HTML
Just adding some forgotten backslashes.
r? `@jsha`
|
|
This makes it possible to use Ctrl-F to find methods defined in traits.
|
|
|
|
Don't mark "safe" intrinsics as unsafe
A good example of this is [intrinsics::abort](https://doc.rust-lang.org/nightly/core/intrinsics/fn.abort.html).
Before:

After:

cc ``@jyn514``
r? ``@lqd``
|
|
rustdoc- dont ICE on `ConstEvaluatable` predicates
Fixes #77647
rustdoc doesn't need to be handling these as you cant write them, they just get added implicitly when you write a where clause containing an expression.
|
|
Rollup of 10 pull requests
Successful merges:
- #80269 (Explain non-dropped sender recv in docs)
- #82179 (Add functions `Duration::try_from_secs_{f32, f64}`)
- #85608 (Stabilize `ops::ControlFlow` (just the type))
- #85792 (Refactor windows sockets impl methods)
- #86220 (Improve maybe_uninit_extra docs)
- #86277 (Remove must_use from ALLOWED_ATTRIBUTES)
- #86285 (:arrow_up: rust-analyzer)
- #86294 (Stabilize {std, core}::prelude::rust_*.)
- #86306 (Add mailmap entries for myself)
- #86314 (Remove trailing triple backticks in `mut_keyword` docs)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
fix #85037
|
|
fix #85095
|
|
Remove must_use from ALLOWED_ATTRIBUTES
This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value.
Removing reclaims some valuable space in the summary of methods, particularly when the attribute has a long string value.
As discussed in #84309. Partially addresses #81482.
r? ```@Manishearth```
|
|
Use the now available implementation of `IntoIterator` for arrays
|