Closed
Description
rustdoc pages for struct include a link to the source of the struct itself, at the top of the page. It would also be convenient if rustdoc had linked to the source (with line numbers) of each trait implementation it lists. There are two reasons for this:
- impls can come from a different source file than the struct itself; they can come from the file where the trait was defined. Common examples include
Ext
traits and the primitive types (which have no source of their own). But in these cases, the implementation shows up on the struct's documentation page. - It's pretty common to use a macro to implement a trait, which means that it's hard to find visually where the impl is coming from. For instance, this line is the
impl Iterator for core::slice::Iter
.
And then you have cases where both of these are true....