diff options
Diffstat (limited to 'tests/rustdoc/source-code-pages/src-links-implementor-43893.rs')
| -rw-r--r-- | tests/rustdoc/source-code-pages/src-links-implementor-43893.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs b/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs new file mode 100644 index 00000000000..d9abdcde08d --- /dev/null +++ b/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs @@ -0,0 +1,21 @@ +//@ ignore-cross-compile + +// https://github.com/rust-lang/rust/issues/43893 + +#![crate_name = "foo"] + +pub trait SomeTrait {} +pub struct SomeStruct; + +//@ has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#11' +impl SomeTrait for usize {} + +//@ has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#14-16' +impl SomeTrait for SomeStruct { + // deliberately multi-line impl +} + +pub trait AnotherTrait {} + +//@ has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#21' +impl<T> AnotherTrait for T {} |
