| Age | Commit message (Collapse) | Author | Lines | 
|---|
|  | r=GuillaumeGomez,notriddle
If a trait item appears in rustdoc search, hide the corrosponding impl items
fixes rust-lang/rust#138251
cc `@notriddle` | 
|  |  | 
|  |  | 
|  | rustdoc: put the toolbar on the all item index | 
|  |  | 
|  |  | 
|  | `scrape_examples_ice` rustdoc GUI test | 
|  | outside of local_sources
add test against crashing with --html-after-content file
correctly add --html-after-content to env not args
formatting fix for rustdoc-call-locations-after-content/rmake.rs
Use local crate source file as default span in `render_call_locations`
- avoids unwrapping the first file added to the source map as a local file in
`href_from_span`
move test to tests/rustdoc-gui, rename to scrape_examples_ice
test link is correct
use rustdocflags, rename path in example, track lock file
factor out duplicate function calls
use compile-flags to make sure the after.html file is actually included in the rustdoc call
fix goml go-to path
increment assert-count in sidebar-source-code.goml
adjust crate-search width in search-result-display.goml
renamed Bar in scrape_examples_ice test
make crate name shorter .. | 
|  |  | 
|  | Add support for macro expansion in rustdoc source code pages
This is what it looks like:


You can test it [here](https://rustdoc.crud.net/imperio/macro-expansion/src/lib/lib.rs.html). In this case, I also enabled the `--generate-link-to-definition` to show that both options work well together.
Note: <del>There is a bug currently in firefox where the line numbers are not displayed correctly if they're inside the "macro expansion" span: https://bugzilla.mozilla.org/show_bug.cgi?id=1949948<del> Found a workaround around this bug.
r? `@notriddle` | 
|  | crate | 
|  |  | 
|  |  | 
|  |  | 
|  | When this fails, you get output that looks like:
    /home/user/rust/tests/rustdoc-gui/search-result-impl-disambiguation.goml search-result-impl-disambiguation... FAILED
    [ERROR] `tests/rustdoc-gui/utils.goml` around line 49
        from `tests/rustdoc-gui/search-result-impl-disambiguation.goml` line 25: JS errors occurred: Event: Event
Making the error message more informative requires patching browser-ui-test. | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | 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. | 
|  | rustdoc: on mobile, make the sidebar full width and linewrap
this is because the mobile sidebar cannot be resized, unlike on desktop. | 
|  |  | 
|  | stuff like "clicking the settings menu closes the mobile sidebar"
is now impossible for users to observe, since the mobile sidebar
will always cover the settings menu due to being full-width,
which is good because that behavior is also now impossible for
our testing framework to observe. | 
|  | r=notriddle
rustdoc: Fix links with inline code in trait impl docs
Fixes #140857 | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | This change is based on some discussion on [lolbinarycat's idea],
but with a more "traditional" design. Specifically, this is the
closest thing I could find to a consensus across many systems I
looked at for inspiration:
- In Jira, resizable sidebars have a stack of four dots.
- In The GIMP, resizable sidebars have a stack of three dots.
- In [old Windows], "panes" are defined to have the same border
  style as a window, which has a raised appearance.
- In [NeXT], a drag point usually had an innie, whether the line in a
  slider or the circle in a scroller; I can also hide and show the
  favorites bar in Workspace by dragging on a circular "grip spot"
- In [old Mac], drag handles for things usually had a "grip track"
  of parallel lines.
- [OSX] kept that, but the "Source List" part of the Finder still had
  the circle grip for a time the same way Workspace did
[lolbinarycat's idea]: https://github.com/rust-lang/rust/pull/139420
[old Windows]: https://archive.org/details/windowsinterface00micr/page/n9/mode/2up
[old Mac]: https://archive.org/details/apple-hig/1996_Human_Interface_Guidelines_for_Mac_OS_8_%28WWDC_Release%29/page/16/mode/2up
[NeXT]: https://archive.org/details/apple-hig/1993%20NeXTSTEP%20User%20Interface%20Guidelines%20-%20Release%203/page/145/mode/2up
[OSX]: https://dn721903.ca.archive.org/0/items/apple-hig/MacOSX_HIG_2005_09_08.pdf#page=267 | 
|  | Unify sidebar buttons to use the same image
Part of https://github.com/rust-lang/rust/issues/139832.
The source sidebar looks like this with the new image:

You can test it [here](https://rustdoc.crud.net/imperio/sidebar-images/src/foo/foo.rs.html).
r? `@notriddle` | 
|  |  | 
|  |  | 
|  |  | 
|  | Add rustdoc-gui regression test for #137082
Fixes https://github.com/rust-lang/rust/issues/137082.
Added new commands in `browser-ui-test` allowing us to add a regression test for #137082 and also another to copy code examples content.
r? `@notriddle` | 
|  |  | 
|  | [rustdoc] Add new setting to wrap source code lines when too long
Fixes https://github.com/rust-lang/rust/issues/127334.
Wrapped lines look like this:

It works in both source code pages and doc pages.
You can test it [here](https://rustdoc.crud.net/imperio/code-wrapping/bar/index.html).
r? ``@notriddle`` | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | This continues two ongoing projects:
- Replacing ascii art with real icons that don't look like
  syntax, are understandable to people who're familiar with
  desktop computers and smart devices, and aren't ugly.
- Using labels and tooltips to clarify these icons, when the
  limits of popular iconography hit us. In this case, I've added
  tooltips, because, unfortunately, there's not room for
  always-visible labels. | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | constants and statics are nullary functions, and struct fields are unary functions.
functions (along with methods and trait methods) are prioritized over other
items, like fields and constants. | 
|  |  | 
|  |  | 
|  | `CheckAttrVisitor::check_doc_keyword` checks `#[doc(keyword = "..")]`
attributes to ensure they are on an empty module, and that the value is
a non-empty identifier.
The `rustc::existing_doc_keyword` lint checks these attributes to ensure
that the value is the name of a keyword.
It's silly to have two different checking mechanisms for these
attributes. This commit does the following.
- Changes `check_doc_keyword` to check that the value is the name of a
  keyword (avoiding the need for the identifier check, which removes a
  dependency on `rustc_lexer`).
- Removes the lint.
- Updates tests accordingly.
There is one hack: the `SelfTy` FIXME case used to used to be handled by
disabling the lint, but now is handled with a special case in
`is_doc_keyword`. That hack will go away if/when the FIXME is fixed.
Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com> |