2020-11-28 19:25:41 -06:00
|
|
|
// @has basic/index.html
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'struct.ThisType.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'struct basic::ThisType'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'struct.ThisType.html#method.this_method'
|
2023-02-21 15:11:28 -06:00
|
|
|
// @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'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'enum.ThisEnum.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'enum basic::ThisEnum'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'enum.ThisEnum.html#variant.ThisVariant'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'variant basic::ThisEnum::ThisVariant'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'trait.ThisTrait.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'trait basic::ThisTrait'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'trait.ThisTrait.html#tymethod.this_associated_method'
|
2023-02-21 15:11:28 -06:00
|
|
|
// @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'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'trait.ThisTrait.html#associatedtype.ThisAssociatedType'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'associated type basic::ThisTrait::ThisAssociatedType'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'trait.ThisTrait.html#associatedconstant.THIS_ASSOCIATED_CONST'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'associated constant basic::ThisTrait::THIS_ASSOCIATED_CONST'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'trait.ThisTrait.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'trait basic::ThisTrait'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'type.ThisAlias.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'type basic::ThisAlias'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'union.ThisUnion.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'union basic::ThisUnion'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'fn.this_function.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'fn basic::this_function'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'constant.THIS_CONST.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'constant basic::THIS_CONST'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'static.THIS_STATIC.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'static basic::THIS_STATIC'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'macro.this_macro.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'macro basic::this_macro'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'trait.SoAmbiguous.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'trait basic::SoAmbiguous'
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has - '//a/@href' 'fn.SoAmbiguous.html'
|
2023-02-13 23:57:28 -06:00
|
|
|
// @has - '//a/@title' 'fn basic::SoAmbiguous'
|
2017-12-28 16:48:30 -06:00
|
|
|
//! In this crate we would like to link to:
|
|
|
|
//!
|
2018-01-07 17:09:16 -06:00
|
|
|
//! * [`ThisType`](ThisType)
|
2018-01-24 22:41:25 -06:00
|
|
|
//! * [`ThisType::this_method`](ThisType::this_method)
|
2023-02-21 15:11:28 -06:00
|
|
|
//! * [`ThisType::this_assoc_fn`](ThisType::this_assoc_fn)
|
2018-01-07 17:09:16 -06:00
|
|
|
//! * [`ThisEnum`](ThisEnum)
|
2018-01-24 22:41:25 -06:00
|
|
|
//! * [`ThisEnum::ThisVariant`](ThisEnum::ThisVariant)
|
2019-02-28 12:54:19 -06:00
|
|
|
//! * [`ThisEnum::ThisVariantCtor`](ThisEnum::ThisVariantCtor)
|
2018-01-07 17:09:16 -06:00
|
|
|
//! * [`ThisTrait`](ThisTrait)
|
2018-01-24 22:41:25 -06:00
|
|
|
//! * [`ThisTrait::this_associated_method`](ThisTrait::this_associated_method)
|
2023-02-21 15:11:28 -06:00
|
|
|
//! * [`ThisTrait::this_associated_fn`](ThisTrait::this_associated_fn)
|
2018-01-24 22:41:25 -06:00
|
|
|
//! * [`ThisTrait::ThisAssociatedType`](ThisTrait::ThisAssociatedType)
|
|
|
|
//! * [`ThisTrait::THIS_ASSOCIATED_CONST`](ThisTrait::THIS_ASSOCIATED_CONST)
|
2018-01-07 17:09:16 -06:00
|
|
|
//! * [`ThisAlias`](ThisAlias)
|
|
|
|
//! * [`ThisUnion`](ThisUnion)
|
2018-01-08 13:20:19 -06:00
|
|
|
//! * [`this_function`](this_function())
|
|
|
|
//! * [`THIS_CONST`](const@THIS_CONST)
|
|
|
|
//! * [`THIS_STATIC`](static@THIS_STATIC)
|
2018-01-07 17:09:16 -06:00
|
|
|
//! * [`this_macro`](this_macro!)
|
2018-01-08 09:33:27 -06:00
|
|
|
//!
|
|
|
|
//! In addition, there's some specifics we want to look at. There's [a trait called
|
|
|
|
//! SoAmbiguous][ambig-trait], but there's also [a function called SoAmbiguous][ambig-fn] too!
|
|
|
|
//! Whatever shall we do?
|
|
|
|
//!
|
|
|
|
//! [ambig-trait]: trait@SoAmbiguous
|
|
|
|
//! [ambig-fn]: SoAmbiguous()
|
2018-01-07 17:09:16 -06:00
|
|
|
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! this_macro {
|
|
|
|
() => {};
|
|
|
|
}
|
2017-12-28 16:48:30 -06:00
|
|
|
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has basic/struct.ThisType.html '//a/@href' 'macro.this_macro.html'
|
2020-07-09 12:27:48 -05:00
|
|
|
/// another link to [`this_macro!()`]
|
2017-12-28 16:48:30 -06:00
|
|
|
pub struct ThisType;
|
2018-01-24 22:41:25 -06:00
|
|
|
|
|
|
|
impl ThisType {
|
2023-02-21 15:11:28 -06:00
|
|
|
pub fn this_assoc_fn() {}
|
|
|
|
pub fn this_method(self) {}
|
2018-01-24 22:41:25 -06:00
|
|
|
}
|
2019-02-28 12:54:19 -06:00
|
|
|
pub enum ThisEnum { ThisVariant, ThisVariantCtor(u32), }
|
2018-01-24 22:41:25 -06:00
|
|
|
pub trait ThisTrait {
|
|
|
|
type ThisAssociatedType;
|
|
|
|
const THIS_ASSOCIATED_CONST: u8;
|
2023-02-21 15:11:28 -06:00
|
|
|
fn this_associated_fn();
|
|
|
|
fn this_associated_method(&self);
|
2018-01-24 22:41:25 -06:00
|
|
|
}
|
2017-12-28 16:48:30 -06:00
|
|
|
pub type ThisAlias = Result<(), ()>;
|
|
|
|
pub union ThisUnion { this_field: usize, }
|
|
|
|
|
|
|
|
pub fn this_function() {}
|
|
|
|
pub const THIS_CONST: usize = 5usize;
|
|
|
|
pub static THIS_STATIC: usize = 5usize;
|
2018-01-08 09:33:27 -06:00
|
|
|
|
|
|
|
pub trait SoAmbiguous {}
|
|
|
|
|
2018-08-29 08:21:01 -05:00
|
|
|
#[allow(nonstandard_style)]
|
2018-01-08 09:33:27 -06:00
|
|
|
pub fn SoAmbiguous() {}
|
2018-02-18 16:55:48 -06:00
|
|
|
|
|
|
|
|
2021-03-17 13:41:01 -05:00
|
|
|
// @has basic/struct.SomeOtherType.html '//a/@href' 'struct.ThisType.html'
|
|
|
|
// @has - '//a/@href' 'struct.ThisType.html#method.this_method'
|
|
|
|
// @has - '//a/@href' 'enum.ThisEnum.html'
|
|
|
|
// @has - '//a/@href' 'enum.ThisEnum.html#variant.ThisVariant'
|
2018-02-18 16:55:48 -06:00
|
|
|
/// Shortcut links for:
|
|
|
|
/// * [`ThisType`]
|
|
|
|
/// * [`ThisType::this_method`]
|
|
|
|
/// * [ThisEnum]
|
|
|
|
/// * [ThisEnum::ThisVariant]
|
|
|
|
pub struct SomeOtherType;
|