| Age | Commit message (Collapse) | Author | Lines |
|
Add `go_to_first` query param to jump to first result
Fixes #84214
Note that while the issue initially wanted to navigate to an entry on exact match, the discussion settled on using a query parameter (`&go_to_first=true`) instead, regardless of exact or partial match.
Demonstration is attached
https://user-images.githubusercontent.com/4934853/120258768-7ff28980-c247-11eb-8c8f-1a2ceb242788.mp4
|
|
Show triangle on the "Details" disclosure element in all cases
Re-submission of #82805, fixes the style issue by applying the same margin as `<p>`.
<details><summary>Before</summary>


</details>
<details><summary>After</summary>


</details>
r? `@GuillaumeGomez`
|
|
Reserve prefixed identifiers and literals (RFC 3101)
This PR denies any identifiers immediately followed by one of three tokens `"`, `'` or `#`, which is stricter than the requirements of RFC 3101 but may be necessary according to the discussion at [Zulip].
[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/268952-edition-2021/topic/reserved.20prefixes/near/238470099
The tracking issue #84599 says we'll add a feature gate named `reserved_prefixes`, but I don't think I can do this because it is impossible for the lexer to know whether a feature is enabled or not. I guess determining the behavior by the edition information should be enough.
Fixes #84599
|
|
result
|
|
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: Render `<Self as X>::Y` type casts properly across crate bounds
My last PR that introduced the type casting did not work for cross-crate re-exported traits, which is fixed in this PR.
Fully resolves #85454
|
|
|
|
This commit denies any identifiers immediately followed by
one of three tokens `"`, `'` or `#`, which is stricter than
the requirements of RFC 3101 but may be necessary according
to the discussion at [Zulip].
[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/268952-edition-2021/topic/reserved.20prefixes/near/238470099
|
|
Properly render HRTBs
```rust
pub fn test<T>()
where
for<'a> &'a T: Iterator,
{}
```
This will now render properly including the `for<'a>`

I do not know if this covers all cases, it only covers everything that I could think of that includes `for` and lifetimes in where bounds.
Also someone need to mentor me on how to add a proper rustdoc test for this.
Resolves #78482
|
|
Use HTTPS links where possible
While looking at #86583, I wondered how many other (insecure) HTTP links were in `rustc`. This changes most other `http` links to `https`. While most of the links are in comments or documentation, there are a few other HTTP links that are used by CI that are changed to HTTPS.
Notes:
- I didn't change any to or in licences
- Some links don't support HTTPS :(
- Some `http` links were dead, in those cases I upgraded them to their new places (all of which used HTTPS)
|
|
chore(rustdoc): remove unused members of RenderType
PR #86561 removes the only place the `generics` member is read. This PR does even more cleanup.
|
|
Rustdoc: Do not list impl when trait has doc(hidden)
Fixes #86448.
|
|
Co-authored-by: Miguel Ojeda <ojeda@kernel.org>
|
|
Commit e629381653bb3579f0cea0b256e391edef5e8dbb removes the only place
these members variables are actually read.
|
|
|
|
|
|
* implement sans-serif #85621
|
|
chore(rustdoc): Remove unused impl block
|
|
|
|
Fix crate filter search reset
I found a fun bug when using rustdoc recently: I made a search, cut the search input content, changed the crate filter, pasted back the input content. To my surprise, the crate filter wasn't applied. It's because that our search input was empty when receiving the `<select>` "onchange" event. To fix this issue, I reset the `currentResults` variable to `null`.
It's using the first commit from #86542 so it needs to wait for it before getting merged.
r? `@jsha`
|
|
|
|
Revert "List trait impls before methods from deref in the sidebar ..."
This reverts commit 8a058926ecd6d0988714f8f7a5a31293c533f8c6.
Fixes #85618
r? `@jyn514`
|
|
Rustdoc's output"
This reverts commit 8a058926ecd6d0988714f8f7a5a31293c533f8c6.
|
|
|
|
Improvements to intra-doc link macro disambiguators
A few small improvements around macro disambiguators:
- display the link text as it was entered: previously `[macro!()]` would be displayed without the parantheses (fixes #86309)
- support `!{}` and `![]` as macro disambiguators (fixes #86310)
r? `@jyn514` cc `@Manishearth` `@camelid`
|
|
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`
|