Skip to content

Commit

Permalink
rustdoc: update test case with intra-doc link pointing to method
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Feb 22, 2023
1 parent 3f37412 commit 881280f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/rustdoc/intra-doc/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
// @has - '//a/@href' 'struct.ThisType.html'
// @has - '//a/@title' 'struct basic::ThisType'
// @has - '//a/@href' 'struct.ThisType.html#method.this_method'
// @has - '//a/@title' 'associated function basic::ThisType::this_method'
// @has - '//a/@title' 'method basic::ThisType::this_method'
// @has - '//a/@href' 'struct.ThisType.html#method.this_assoc_fn'
// @has - '//a/@title' 'associated function basic::ThisType::this_assoc_fn'
// @has - '//a/@href' 'enum.ThisEnum.html'
// @has - '//a/@title' 'enum basic::ThisEnum'
// @has - '//a/@href' 'enum.ThisEnum.html#variant.ThisVariant'
// @has - '//a/@title' 'variant basic::ThisEnum::ThisVariant'
// @has - '//a/@href' 'trait.ThisTrait.html'
// @has - '//a/@title' 'trait basic::ThisTrait'
// @has - '//a/@href' 'trait.ThisTrait.html#tymethod.this_associated_method'
// @has - '//a/@title' 'associated function basic::ThisTrait::this_associated_method'
// @has - '//a/@title' 'method basic::ThisTrait::this_associated_method'
// @has - '//a/@href' 'trait.ThisTrait.html#tymethod.this_associated_fn'
// @has - '//a/@title' 'associated function basic::ThisTrait::this_associated_fn'
// @has - '//a/@href' 'trait.ThisTrait.html#associatedtype.ThisAssociatedType'
// @has - '//a/@title' 'associated type basic::ThisTrait::ThisAssociatedType'
// @has - '//a/@href' 'trait.ThisTrait.html#associatedconstant.THIS_ASSOCIATED_CONST'
Expand All @@ -37,11 +41,13 @@
//!
//! * [`ThisType`](ThisType)
//! * [`ThisType::this_method`](ThisType::this_method)
//! * [`ThisType::this_assoc_fn`](ThisType::this_assoc_fn)
//! * [`ThisEnum`](ThisEnum)
//! * [`ThisEnum::ThisVariant`](ThisEnum::ThisVariant)
//! * [`ThisEnum::ThisVariantCtor`](ThisEnum::ThisVariantCtor)
//! * [`ThisTrait`](ThisTrait)
//! * [`ThisTrait::this_associated_method`](ThisTrait::this_associated_method)
//! * [`ThisTrait::this_associated_fn`](ThisTrait::this_associated_fn)
//! * [`ThisTrait::ThisAssociatedType`](ThisTrait::ThisAssociatedType)
//! * [`ThisTrait::THIS_ASSOCIATED_CONST`](ThisTrait::THIS_ASSOCIATED_CONST)
//! * [`ThisAlias`](ThisAlias)
Expand All @@ -68,13 +74,15 @@ macro_rules! this_macro {
pub struct ThisType;

impl ThisType {
pub fn this_method() {}
pub fn this_assoc_fn() {}
pub fn this_method(self) {}
}
pub enum ThisEnum { ThisVariant, ThisVariantCtor(u32), }
pub trait ThisTrait {
type ThisAssociatedType;
const THIS_ASSOCIATED_CONST: u8;
fn this_associated_method();
fn this_associated_fn();
fn this_associated_method(&self);
}
pub type ThisAlias = Result<(), ()>;
pub union ThisUnion { this_field: usize, }
Expand Down

0 comments on commit 881280f

Please sign in to comment.