| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fix index-page generation
Fixes #60096.
The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons.
r? @rust-lang/rustdoc
|
|
|
|
|
|
|
|
|
|
rustdoc: use --static-root-path for settings.js
At the time i was writing https://github.com/rust-lang/docs.rs/pull/332, i noticed that the `settings.js` file that was being loaded was not being loaded from the `--static-root-path`. This PR fixes that so that users on docs.rs can effectively cache this file.
|
|
|
|
|
|
rustdoc: don't process `Crate::external_traits` when collecting intra-doc links
Part of https://github.com/rust-lang/rust/issues/58745, closes https://github.com/rust-lang/rust/pull/58917
The `collect-intra-doc-links` pass keeps track of the modules it recurses through as it processes items. This is used to know what module to give the resolver when looking up links. When looking through the regular items of the crate, this works fine, but the `DocFolder` trait as written doesn't just process the main crate hierarchy - it also processes the trait items in the `external_traits` map. This is useful for other passes (so they can strip out `#[doc(hidden)]` items, for example), but here it creates a situation where we're processing items "outside" the regular module hierarchy. Since everything in `external_traits` is defined outside the current crate, we can't fall back to finding its module scope like we do with local items.
Skipping this collection saves us from emitting some spurious warnings. We don't even lose anything by skipping it, either - the docs loaded from here are only ever rendered through `html::render::document_short` which strips any links out, so the fact that the links haven't been loaded doesn't matter. Hopefully this removes most of the remaining spurious resolution warnings from intra-doc links.
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
Add default keyword handling in rustdoc
Fixes #58898.
r? @QuietMisdreavus
|
|
- Makes the warning part of the `intra_doc_link_resolution_failure`
lint.
- Tightens the span to just the ambiguous link.
- Reports ambiguities across all three namespaces.
- Uses structured suggestions for disambiguation.
- Adds a test for the warnings.
|
|
|
|
|
|
|
|
Add support for defining C compatible variadic functions in unsafe rust
with extern "C".
|
|
|
|
rustdoc: respect alternate flag when formatting impl trait
Fixes #58226.
Before:
<img width="963" alt="screen shot 2019-02-12 at 3 23 30 pm" src="https://user-images.githubusercontent.com/1372438/52665732-4496ea00-2eda-11e9-9e29-efffe43b2abf.png">
After:
<img width="964" alt="screen shot 2019-02-12 at 3 23 51 pm" src="https://user-images.githubusercontent.com/1372438/52665733-452f8080-2eda-11e9-999a-dd1fb28dee16.png">
|
|
Modify doctest's auto-`fn main()` to allow `Result`s
This lets the default `fn main()` ~~return `impl Termination`~~ unwrap Results, which allows the use of `?` in most tests without adding it manually. This fixes #56260
~~Blocked on `std::process::Termination` stabilization.~~
Using `Termination` would have been cleaner, but this should work OK.
|
|
This lets the default `fn main()` unwrap any `Result`s, which
allows the use of `?` in most tests without adding it manually.
|
|
r=ollie27
Rustdoc remove old style files
Reopening of #56577 (which I can't seem to reopen...).
I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
|
|
Ignore future deprecations in #[deprecated]
The future deprecation warnings should only apply to `#[rustc_deprecated]` as they take into account rustc's version. Fixes #57952.
I've also slightly modified rustdoc's display of future deprecation notices to make it more consistent, so I'm assigning a rustdoc team member for review to make sure this is okay.
r? @GuillaumeGomez
|
|
allow shorthand syntax for deprecation reason
Fixes #48271.
Created based on discussion in #56896.
|
|
Cosmetic improvements to doc comments
This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).
r? @steveklabnik
Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
|
|
|
|
|
|
|
|
|
|
|
|
Add trait alias support in rustdoc
Fixes #57595.
r? @QuietMisdreavus
|
|
rustdoc: display sugared return types for async functions
Fixes #58027.
|
|
|
|
|
|
|
|
rustdoc: wrap stability tags in colored spans
A cosmetic change to make the stability tags stand out a bit against the docs. Opening for discussion.
Before:


After:


r? @QuietMisdreavus
|
|
r=QuietMisdreavus
Fix image link in the settings menu
Fixes #57892.
r? @QuietMisdreavus
|
|
rustdoc: remove blank unstable spans
Rustdoc generates blank unstable spans for unstable struct fields: 
This PR removes them:

r? @QuietMisdreavus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|