rustdoc: add intra-doc trait impl test for extern types
This commit is contained in:
parent
9ff8ae097e
commit
ae20500d76
2 changed files with 24 additions and 3 deletions
|
@ -4,14 +4,34 @@ extern {
|
||||||
pub type ExternType;
|
pub type ExternType;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ExternType {
|
pub trait T {
|
||||||
pub fn f(&self) {
|
fn test(&self) {}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
pub trait G<N> {
|
||||||
|
fn g(&self, n: N) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ExternType {
|
||||||
|
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/foreigntype.ExternType.html'
|
||||||
// @has 'extern_type/fn.links_to_extern_type.html' \
|
// @has 'extern_type/fn.links_to_extern_type.html' \
|
||||||
// 'href="foreigntype.ExternType.html#method.f"'
|
// '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::f]
|
||||||
|
/// See also [ExternType::test]
|
||||||
|
/// See also [ExternType::g]
|
||||||
pub fn links_to_extern_type() {}
|
pub fn links_to_extern_type() {}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#![deny(rustdoc::broken_intra_doc_links)]
|
#![deny(rustdoc::broken_intra_doc_links)]
|
||||||
|
|
||||||
// Test intra-doc links on trait implementations with generics
|
// Test intra-doc links on trait implementations with generics
|
||||||
|
// regression test for issue #92662
|
||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue