-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: Fix up some bugs with bounds #17798
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
RegionBound, // FIXME(#16518) -- need to include name of actual region | ||
RegionBound(Lifetime), | ||
UnboxedFnBound(UnboxedFnType), | ||
UnknownBound, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this UnknownBound
variant is unfortunate and only here as a fallback for a couple Clean
impls in case the DocContext
isn't typed. I'm not quite sure why those impls call tcx_opt()
and not tcx()
. If it's safe to do so, I'd rather change those impls to use tcx()
and get rid of this variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything which handles the tcx_opt()
case is basically something called along the rustdoc --test
path (if I recall correctly...). If you can bootstrap and run make check
without having UnknownBound
, feel free to remove it! You can also be lossy for things like this when tcx_opt()
returns None
because the only purpose is to crawl the documentation to learn about tests.
9d43635
to
aa0b9bf
Compare
aa0b9bf
to
3bd4475
Compare
Rebased. Opted to just return a static region bound in those cases. |
Added another commit to fix #17798 |
…richton This PR adds support in rustdoc for properly naming lifetimes in bounds, instead of just showing `'static` for everything. It also adds support for unboxed function sugar bounds, which were also previously rendered as `'static`.
…=Veykril Add explicit enum discriminant assist Add assist for adding explicit discriminants to all variants of an enum. Closes rust-lang#17798.
This PR adds support in rustdoc for properly naming lifetimes in bounds, instead of just showing
'static
for everything. It also adds support for unboxed function sugar bounds, which were also previously rendered as'static
.