Skip to content

Commit 08ca4fd

Browse files
committed
Add tests
1 parent c26f887 commit 08ca4fd

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/test/rustdoc/intra-links.rs

+20-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010

1111
// @has intra_links/index.html
1212
// @has - '//a/@href' '../intra_links/struct.ThisType.html'
13+
// @has - '//a/@href' '../intra_links/struct.ThisType.html#method.this_method'
1314
// @has - '//a/@href' '../intra_links/enum.ThisEnum.html'
15+
// @has - '//a/@href' '../intra_links/enum.ThisEnum.html#ThisVariant.v'
16+
// @has - '//a/@href' '../intra_links/trait.ThisTrait.html'
17+
// @has - '//a/@href' '../intra_links/trait.ThisTrait.html#tymethod.this_associated_method'
18+
// @has - '//a/@href' '../intra_links/trait.ThisTrait.html#associatedtype.ThisAssociatedType'
19+
// @has - '//a/@href' '../intra_links/trait.ThisTrait.html#associatedconstant.THIS_ASSOCIATED_CONST'
1420
// @has - '//a/@href' '../intra_links/trait.ThisTrait.html'
1521
// @has - '//a/@href' '../intra_links/type.ThisAlias.html'
1622
// @has - '//a/@href' '../intra_links/union.ThisUnion.html'
@@ -23,8 +29,13 @@
2329
//! In this crate we would like to link to:
2430
//!
2531
//! * [`ThisType`](ThisType)
32+
//! * [`ThisType::this_method`](ThisType::this_method)
2633
//! * [`ThisEnum`](ThisEnum)
34+
//! * [`ThisEnum::ThisVariant`](ThisEnum::ThisVariant)
2735
//! * [`ThisTrait`](ThisTrait)
36+
//! * [`ThisTrait::this_associated_method`](ThisTrait::this_associated_method)
37+
//! * [`ThisTrait::ThisAssociatedType`](ThisTrait::ThisAssociatedType)
38+
//! * [`ThisTrait::THIS_ASSOCIATED_CONST`](ThisTrait::THIS_ASSOCIATED_CONST)
2839
//! * [`ThisAlias`](ThisAlias)
2940
//! * [`ThisUnion`](ThisUnion)
3041
//! * [`this_function`](this_function())
@@ -45,8 +56,16 @@ macro_rules! this_macro {
4556
}
4657

4758
pub struct ThisType;
59+
60+
impl ThisType {
61+
pub fn this_method() {}
62+
}
4863
pub enum ThisEnum { ThisVariant, }
49-
pub trait ThisTrait {}
64+
pub trait ThisTrait {
65+
type ThisAssociatedType;
66+
const THIS_ASSOCIATED_CONST: u8;
67+
fn this_associated_method();
68+
}
5069
pub type ThisAlias = Result<(), ()>;
5170
pub union ThisUnion { this_field: usize, }
5271

0 commit comments

Comments
 (0)