add [src] links to methods on a trait's page
This commit is contained in:
parent
b491587c91
commit
ae644a2d4d
3 changed files with 43 additions and 24 deletions
26
src/test/rustdoc/trait-src-link.rs
Normal file
26
src/test/rustdoc/trait-src-link.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#![crate_name = "quix"]
|
||||
pub trait Foo {
|
||||
// @has quix/trait.Foo.html '//a[@href="../src/quix/trait-src-link.rs.html#4"]' '[src]'
|
||||
fn required();
|
||||
|
||||
// @has quix/trait.Foo.html '//a[@href="../src/quix/trait-src-link.rs.html#7"]' '[src]'
|
||||
fn provided() {}
|
||||
}
|
||||
|
||||
pub struct Bar;
|
||||
|
||||
impl Foo for Bar {
|
||||
// @has quix/struct.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#14"]' '[src]'
|
||||
fn required() {}
|
||||
// @has quix/struct.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#7"]' '[src]'
|
||||
}
|
||||
|
||||
pub struct Baz;
|
||||
|
||||
impl Foo for Baz {
|
||||
// @has quix/struct.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#22"]' '[src]'
|
||||
fn required() {}
|
||||
|
||||
// @has quix/struct.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#25"]' '[src]'
|
||||
fn provided() {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue