-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make rustdoc more responsive #16277
make rustdoc more responsive #16277
Conversation
Fixes #16269 |
"Stability dashboard" was just changed to 'stability', so this should as well, for consistency |
* move some sidebar contents to a title bar when small * inline description toggle when small * make out-of-band and in-band content share space, rather than float and clash * compress wording of out-of-band content to avoid line-wrap as much as possible
Currently rebuilding from rebase, may take a bit. |
@steveklabnik that's actually the current behaviour of master before this change. I can try to fix it (the problem is that the heading is big with extra padding), but that might be out-of-scope for this change. Your call. |
Merge and build successful. |
Unclear on the status of this. Should I be fixing @steveklabnik's issue, or is this a-ok? |
* move some sidebar contents to a title bar when small * inline description toggle when small * make out-of-band and in-band content share space, rather than float and clash * compress wording of out-of-band content to avoid line-wrap as much as possible ## [Live Version Here](http://cg.scs.carleton.ca/~abeinges/doc/index.html) Pages Of Interest: * [Vec](http://cg.scs.carleton.ca/~abeinges/doc/std/vec/struct.Vec.html) (small path) * [TreeSet](http://cg.scs.carleton.ca/~abeinges/doc/collections/treemap/struct.TreeSet.html) (long path) * [std](http://cg.scs.carleton.ca/~abeinges/doc/std/index.html) (for stability dash) TBD in a future PR is to convert links in the sidebar into a series of nest ul/li's, so that they can easily be moved to a drop-down in the new title bar. I think this is out of scope for this PR, but am willing to implement it now if desired.
Resolve panic in `generate_delegate_methods` Fixes rust-lang#16276 This PR addresses two issues: 1. When using `PathTransform`, it searches for the node corresponding to the `path` in the `source_scope` during `make::fn_`. Therefore, we need to perform the transform before `make::fn_` (similar to the problem in issue rust-lang#15804). Otherwise, even though the tokens are the same, their offsets (i.e., `span`) differ, resulting in the error "Can't find CONST_ARG@xxx." 2. As mentioned in the first point, `PathTransform` searches for the node corresponding to the `path` in the `source_scope`. Thus, when transforming paths, we should update nodes from right to left (i.e., use **reverse of preorder** (right -> left -> root) instead of **postorder** (left -> right -> root)). Reasons are as follows: In the red-green tree (rowan), we do not store absolute ranges but instead store the length of each node and dynamically calculate offsets (spans). Therefore, when modifying the left-side node (such as nodes are inserted or deleted), it causes all right-side nodes' spans to change. This, in turn, leads to PathTransform being unable to find nodes with the same paths (due to different spans), resulting in errors.
Live Version Here
Pages Of Interest:
TBD in a future PR is to convert links in the sidebar into a series of nest ul/li's, so that they can easily be moved to a drop-down in the new title bar. I think this is out of scope for this PR, but am willing to implement it now if desired.