-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: Clean up handling of lifetime bounds #88604
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
Conversation
Previously, rustdoc recorded lifetime bounds by rendering them into the name of the lifetime parameter. Now, it leaves the name as the actual name and instead records lifetime bounds in an `outlives` list, similar to how type parameter bounds are recorded.
This cleans up the other spot I found where rustdoc was rendering bounds into the lifetime name itself. However, in this case, I don't think it could have actually happened because higher-ranked lifetime definitions aren't currently allowed to have bounds.
rustdoc-json-types is a public (although nightly-only) API. Consider changing |
You did it faster than I expected. Looks great, thanks a lot! @bors: r+ |
📌 Commit 3a3f99a has been approved by |
@bors r- This doesn't update format-version in rustdoc-json-types. Please read the messages from highfive, I set them up for a reason. |
Oh sorry, I missed https://github.com/rust-lang/rust/pull/88604/files#diff-1a2ef1ea43fd65123fdf8a158a34408aa7c31c4bdb34ce1458b7f6c22b3ab459R237. Seems weird that the format-version is in rustdoc and not in rustdoc-json-types - maybe we should change that at some point? @bors r=GuillaumeGomez |
📌 Commit 3a3f99a has been approved by |
Please open an issue so we don't forget. ;) |
☀️ Test successful - checks-actions |
Previously, rustdoc recorded lifetime bounds by rendering them into the
name of the lifetime parameter. Now, it leaves the name as the actual
name and instead records lifetime bounds in an
outlives
list, similarto how type parameter bounds are recorded.
Also, higher-ranked lifetimes cannot currently have bounds, so I simplified
the code to reflect that.
r? @GuillaumeGomez