diff options
| author | Mahdi Dibaiee <mdibaiee@pm.me> | 2022-01-13 08:10:08 +0000 |
|---|---|---|
| committer | Mahdi Dibaiee <mdibaiee@pm.me> | 2022-01-13 20:23:24 +0000 |
| commit | ae20500d76e36b5e8692af499830c4707f713bc0 (patch) | |
| tree | f410ac94ec2f205c03f417ad059d9c7afa3b4344 /src/test/rustdoc | |
| parent | 9ff8ae097e88937a4aa6cf62d73471e479bac1df (diff) | |
| download | rust-ae20500d76e36b5e8692af499830c4707f713bc0.tar.gz rust-ae20500d76e36b5e8692af499830c4707f713bc0.zip | |
rustdoc: add intra-doc trait impl test for extern types
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/intra-doc/extern-type.rs | 24 | ||||
| -rw-r--r-- | src/test/rustdoc/intra-doc/generic-trait-impl.rs | 1 |
2 files changed, 23 insertions, 2 deletions
diff --git a/src/test/rustdoc/intra-doc/extern-type.rs b/src/test/rustdoc/intra-doc/extern-type.rs index f37ae62dde1..ab088ab789d 100644 --- a/src/test/rustdoc/intra-doc/extern-type.rs +++ b/src/test/rustdoc/intra-doc/extern-type.rs @@ -4,14 +4,34 @@ extern { pub type ExternType; } +pub trait T { + fn test(&self) {} +} + +pub trait G<N> { + fn g(&self, n: N) {} +} + impl ExternType { - pub fn f(&self) { + pub fn f(&self) {} +} - } +impl T for ExternType { + fn test(&self) {} +} + +impl G<usize> for ExternType { + fn g(&self, n: usize) {} } // @has 'extern_type/foreigntype.ExternType.html' // @has 'extern_type/fn.links_to_extern_type.html' \ // 'href="foreigntype.ExternType.html#method.f"' +// @has 'extern_type/fn.links_to_extern_type.html' \ +// 'href="foreigntype.ExternType.html#method.test"' +// @has 'extern_type/fn.links_to_extern_type.html' \ +// 'href="foreigntype.ExternType.html#method.g"' /// See also [ExternType::f] +/// See also [ExternType::test] +/// See also [ExternType::g] pub fn links_to_extern_type() {} diff --git a/src/test/rustdoc/intra-doc/generic-trait-impl.rs b/src/test/rustdoc/intra-doc/generic-trait-impl.rs index c3d3f8b3866..ba8595abfa9 100644 --- a/src/test/rustdoc/intra-doc/generic-trait-impl.rs +++ b/src/test/rustdoc/intra-doc/generic-trait-impl.rs @@ -1,6 +1,7 @@ #![deny(rustdoc::broken_intra_doc_links)] // Test intra-doc links on trait implementations with generics +// regression test for issue #92662 use std::marker::PhantomData; |
