Add trait alias support in rustdoc#58243
Conversation
09efb73 to
d55664c
Compare
src/librustdoc/clean/mod.rs
Outdated
There was a problem hiding this comment.
We should check if spotlight actually works for trait impls using an aliased trait.
So, we should see what happens for:
#[doc(spotlight)]
trait Foo {}
trait Bar = Foo;
struct Ty;
impl Bar for Ty;and
trait Foo {}
#[doc(spotlight)]
trait Bar = Foo;
struct Ty;
impl Bar for Ty;There was a problem hiding this comment.
You can't implement a trait alias directly. So I guess that spotlight doesn't make sense for a trait alias. I'll remove spotlight "support" for them.
src/librustdoc/html/render.rs
Outdated
There was a problem hiding this comment.
trait-aliases, to be consistent.
(should there be a hyphen at all?)
There was a problem hiding this comment.
It's a css class so I guess it's fine (but I'll keep the hyphen :) )
There was a problem hiding this comment.
It's nice to be consistent, also: y'all have theming support so the css classes do matter, if only a little bit
d55664c to
b1d82ac
Compare
|
Updated. |
|
@bors r+ |
|
📌 Commit b1d82ac has been approved by |
…Manishearth Add trait alias support in rustdoc Fixes rust-lang#57595. r? @QuietMisdreavus
Rollup of 16 pull requests Successful merges: - #57259 (Update reference of rlibc crate to compiler-builtins crate) - #57740 (Use `to_ne_bytes` for converting IPv4Addr to octets) - #57926 (Tiny expansion to docs for `core::convert`.) - #58157 (Add Cargo.lock automatically adding message) - #58203 (rustdoc: display sugared return types for async functions) - #58243 (Add trait alias support in rustdoc) - #58262 (Add #[must_use] message to Fn* traits) - #58295 (std::sys::unix::stdio: explain why we do into_raw) - #58297 (Cleanup JS a bit) - #58317 (Some writing improvement, conciseness of intro) - #58324 (miri: give non-generic functions a stable address) - #58332 (operand-to-place copies should never be overlapping) - #58345 (When there are multiple filenames, print what got interpreted as filenames) - #58346 (rpath computation: explain why we pop()) - #58350 (Fix failing tidy (line endings on Windows)) - #58352 (miri value visitor: use `?` in macro) Failed merges: r? @ghost
Fixes #57595.
r? @QuietMisdreavus